Skip to content

Commit 573f7cc

Browse files
authored
show userpresets in project outline (#3877)
1 parent 1525857 commit 573f7cc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Bug Fixes:
66

77
- Fix issue where `cmake.preferredGenerators` wasn't falling back to the next entry when the first entry didn't exist [#2709](https://github.com/microsoft/vscode-cmake-tools/issues/2709)
88
- Potential fix for attempting to load a non-variants file as a variants file and throwing a parse exception [#3727](https://github.com/microsoft/vscode-cmake-tools/issues/3727)
9+
- Fix issue where `cmakeUserPresets.json` not showing up in project outline. [#3832](https://github.com/microsoft/vscode-cmake-tools/issues/3832)
910
- Fix edge case where parsing tests fails when additional output is printed before tests json. [#3750](https://github.com/microsoft/vscode-cmake-tools/issues/3750)
1011
- Fix issue where `Configure with CMake Debugger` fails on restart because the previously used pipe to CMake Debugger is no longer available. [#3582](https://github.com/microsoft/vscode-cmake-tools/issues/3582)
1112

src/projectOutline/projectOutline.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,11 @@ export class ProjectNode extends BaseNode {
501501
children.push(new SourceFileNode(this.id, this.folder, this.sourceDirectory, possiblePreset));
502502
}
503503

504+
const possibleUserPreset = path.join(this.sourceDirectory, 'CMakeUserPresets.json');
505+
if (fs.existsSync(possibleUserPreset)) {
506+
children.push(new SourceFileNode(this.id, this.folder, this.sourceDirectory, possibleUserPreset));
507+
}
508+
504509
return children;
505510
}
506511

0 commit comments

Comments
 (0)