Skip to content

Commit 57cb09f

Browse files
authored
Feat: Add pre-fill project name using current folder name (#4533)
* Feat: Add pre-fill project name using current folder name * Update CHANGELOG.md
1 parent 77ca4c1 commit 57cb09f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Features:
1010
- Add `cmake.exclude` setting that allows users to set folders that they want the CMake Tools extension to ignore. [#4112](https://github.com/microsoft/vscode-cmake-tools/issues/4112)
1111
- Add a command to substitute CMake Cache variables in `launch.json` and `tasks.json`. [#4422](https://github.com/microsoft/vscode-cmake-tools/pull/4422)
1212
- Add support for presets v10. [#4459](https://github.com/microsoft/vscode-cmake-tools/issues/4459), [#4445](https://github.com/microsoft/vscode-cmake-tools/issues/4452)
13+
- Add pre-fill project name using current folder name [#4533](https://github.com/microsoft/vscode-cmake-tools/pull/4533) [@HO-COOH](https://github.com/HO-COOH)
1314

1415
Improvements:
1516

src/cmakeProject.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3135,6 +3135,7 @@ export class CMakeProject {
31353135
private async createCMakeListsFile(mainListFile: string): Promise<Number> {
31363136
const projectName = await vscode.window.showInputBox({
31373137
prompt: localize('new.project.name', 'Enter a name for the new project'),
3138+
value: util.removeAllPatterns(path.basename(path.dirname(mainListFile)), [' ']),
31383139
validateInput: (value: string): string => {
31393140
if (!value.length) {
31403141
return localize('project.name.required', 'A project name is required');

0 commit comments

Comments
 (0)