Skip to content

Commit 036e297

Browse files
committed
Apply mergeConfigurations for browse.path.
1 parent 3fc041d commit 036e297

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

Extension/c_cpp_properties.schema.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,9 @@
180180
"type": "string"
181181
},
182182
"mergeConfigurations": {
183-
"markdownDescription": "Set to `true` to merge include paths, defines, and forced includes with those from a configuration provider.",
184-
"descriptionHint": "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered.",
185-
"type": [
186-
"boolean",
187-
"string"
188-
]
183+
"markdownDescription": "Set to `true` to merge `includePath`, `defines`, `forcedInclude`, and `browse.path` with those received from the configuration provider. Changes to `mergeConfigurations` won't take effect until the configuration provider resends the configuration.",
184+
"descriptionHint": "{Locked=\"`true`\"} {Locked=\"`includePath`\"} {Locked=\"`defines`\"} {Locked=\"`forcedInclude`\"} {Locked=\"`browsePath`\"} {Locked=\"`mergeConfigurations`\"}",
185+
"type": "boolean"
189186
},
190187
"browse": {
191188
"type": "object",

Extension/src/LanguageServer/client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ interface CustomConfigurationParams extends WorkspaceFolderParams {
244244

245245
interface CustomBrowseConfigurationParams extends WorkspaceFolderParams {
246246
browseConfiguration: InternalWorkspaceBrowseConfiguration;
247+
mergeConfigurations: boolean;
247248
}
248249

249250
interface CompileCommandsPaths extends WorkspaceFolderParams {
@@ -3349,7 +3350,8 @@ export class DefaultClient implements Client {
33493350

33503351
const params: CustomBrowseConfigurationParams = {
33513352
browseConfiguration: sanitized,
3352-
workspaceFolderUri: this.RootUri?.toString()
3353+
workspaceFolderUri: this.RootUri?.toString(),
3354+
mergeConfigurations: this.configuration.CurrentConfiguration?.mergeConfigurations ?? false
33533355
};
33543356

33553357
void this.languageClient.sendNotification(CustomBrowseConfigurationNotification, params).catch(logAndReturn.undefined);

Extension/src/LanguageServer/configurations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export interface Configuration {
8383
forcedInclude?: string[];
8484
configurationProviderInCppPropertiesJson?: string;
8585
configurationProvider?: string;
86-
mergeConfigurations?: boolean | string;
86+
mergeConfigurations?: boolean;
8787
browse?: Browse;
8888
recursiveIncludes?: RecursiveIncludes;
8989
customConfigurationVariables?: { [key: string]: string };

Extension/ui/settings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@
687687
<div class="section-title" data-loc-id="merge.configurations">Merge configurations</div>
688688
<div>
689689
<input type="checkbox" id="mergeConfigurations" style="vertical-align: middle; transform: scale(1.5)">
690-
<span data-loc-id="merge.configurations.description">When <code>true</code> (or checked), merge include paths, defines, and forced includes with those from a configuration provider.</span>
690+
<span data-loc-id="merge.configurations.description">When <code>true</code> (or checked), merge <code>includePath</code>, <code>defines</code>, <code>forcedInclude</code>, and <code>browse.path</code> with those received from the configuration provider. Changes to <code>mergeConfigurations</code> won't take effect until the the configuration provider resends the configuration.</span>
691691
</input>
692692
</div>
693693
</div>

0 commit comments

Comments
 (0)