Skip to content

Commit

Permalink
Fix configuration provider handling with intelliSenseEngine "disabled…
Browse files Browse the repository at this point in the history
…". (#11797)
  • Loading branch information
sean-mcmanus authored Dec 21, 2023
1 parent 0e24296 commit 8d42c49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Extension/src/LanguageServer/customProviders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import * as vscode from 'vscode';
import { CustomConfigurationProvider, SourceFileConfigurationItem, Version, WorkspaceBrowseConfiguration } from 'vscode-cpptools';
import * as ext from './extension';
import { CppSettings } from './settings';

/**
Expand Down Expand Up @@ -158,7 +157,8 @@ export class CustomConfigurationProviderCollection {
}

public add(provider: CustomConfigurationProvider, version: Version): boolean {
if (new CppSettings(ext.getActiveClient().RootUri).intelliSenseEngine === "disabled") {
const settings: CppSettings = new CppSettings((vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0) ? vscode.workspace.workspaceFolders[0]?.uri : undefined);
if (settings.intelliSenseEngine === "disabled") {
console.warn("Language service is disabled. Provider will not be registered.");
return false;
}
Expand Down

0 comments on commit 8d42c49

Please sign in to comment.