From 692d6f7ea0d0af72332d88318992548d3bc08b47 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson Date: Wed, 5 Mar 2025 16:09:23 -0800 Subject: [PATCH] Let native process populate default browse paths --- Extension/src/LanguageServer/configurations.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index cfa0996ea..8be51b0a7 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -995,17 +995,9 @@ export class CppProperties { if (!configuration.browse.path) { if (settings.defaultBrowsePath) { configuration.browse.path = settings.defaultBrowsePath; - } else if (configuration.includePath) { - // If the user doesn't set browse.path, copy the includePath over. Make sure ${workspaceFolder} is in there though... - configuration.browse.path = configuration.includePath.slice(0); - if (configuration.includePath.findIndex((value: string) => - !!value.match(/^\$\{(workspaceRoot|workspaceFolder)\}(\\\*{0,2}|\/\*{0,2})?$/g)) === -1 - ) { - configuration.browse.path.push("${workspaceFolder}"); - } - } else { - configuration.browse.path = ["${workspaceFolder}"]; } + // Otherwise, if the browse path is not set, let the native process populate it + // with include paths, including any parsed from compilerArgs. } else { configuration.browse.path = this.updateConfigurationPathsArray(configuration.browse.path, settings.defaultBrowsePath, env); }