Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2328,6 +2328,21 @@ export class DefaultClient implements Client {
if (configs && configs.length > 0 && configs[0]) {
const fileConfiguration: configs.Configuration | undefined = this.configuration.CurrentConfiguration;
if (fileConfiguration?.mergeConfigurations) {
// deepCopy is a JSON round trip, which a vscode.Uri does not survive. The copy is
// a plain object that is neither a string nor a Uri, so sendCustomConfigurations
// discards the item. The uri field also accepts a string, so normalize it into a
// new item before copying, without assigning into what the provider returned or
// calling a method on its array.
if (configs instanceof Array) {
const normalized: util.Mutable<SourceFileConfigurationItem>[] = [];
const count: number = configs.length;
for (let i: number = 0; i < count; ++i) {
const config: util.Mutable<SourceFileConfigurationItem> = configs[i];
const uri = config?.uri;
normalized.push(util.isUri(uri) ? { uri: uri.toString(), configuration: config.configuration } : config);
}
Comment thread
sean-mcmanus marked this conversation as resolved.
configs = normalized;
}
configs = deepCopy(configs);
}
// Only the include paths from the provider are checked for recursive includes, so
Expand Down
Loading