Skip to content

Commit 5697dcc

Browse files
authored
Let native process populate default browse paths (#13342)
1 parent 5ebe93c commit 5697dcc

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Extension/src/LanguageServer/configurations.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -995,17 +995,9 @@ export class CppProperties {
995995
if (!configuration.browse.path) {
996996
if (settings.defaultBrowsePath) {
997997
configuration.browse.path = settings.defaultBrowsePath;
998-
} else if (configuration.includePath) {
999-
// If the user doesn't set browse.path, copy the includePath over. Make sure ${workspaceFolder} is in there though...
1000-
configuration.browse.path = configuration.includePath.slice(0);
1001-
if (configuration.includePath.findIndex((value: string) =>
1002-
!!value.match(/^\$\{(workspaceRoot|workspaceFolder)\}(\\\*{0,2}|\/\*{0,2})?$/g)) === -1
1003-
) {
1004-
configuration.browse.path.push("${workspaceFolder}");
1005-
}
1006-
} else {
1007-
configuration.browse.path = ["${workspaceFolder}"];
1008998
}
999+
// Otherwise, if the browse path is not set, let the native process populate it
1000+
// with include paths, including any parsed from compilerArgs.
10091001
} else {
10101002
configuration.browse.path = this.updateConfigurationPathsArray(configuration.browse.path, settings.defaultBrowsePath, env);
10111003
}

0 commit comments

Comments
 (0)