MCPcopy Index your code
hub / github.com/microsoft/vscode-cpptools / DefaultClient

Class DefaultClient

Extension/src/LanguageServer/client.ts:889–4409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

887}
888
889export class DefaultClient implements Client {
890 private innerLanguageClient?: LanguageClient; // The "client" that launches and communicates with our language "server" process.
891 private disposables: vscode.Disposable[] = [];
892 private documentFormattingProviderDisposable: vscode.Disposable | undefined;
893 private formattingRangeProviderDisposable: vscode.Disposable | undefined;
894 private onTypeFormattingProviderDisposable: vscode.Disposable | undefined;
895 private codeFoldingProvider: FoldingRangeProvider | undefined;
896 private codeFoldingProviderDisposable: vscode.Disposable | undefined;
897 private inlayHintsProvider: InlayHintsProvider | undefined;
898 private semanticTokensProvider: SemanticTokensProvider | undefined;
899 private semanticTokensProviderDisposable: vscode.Disposable | undefined;
900 private innerConfiguration?: configs.CppProperties;
901 private rootPathFileWatcher?: vscode.FileSystemWatcher;
902 private rootFolder?: vscode.WorkspaceFolder;
903 private rootRealPath: string;
904 private workspaceStoragePath: string;
905 private trackedDocuments = new Map<string, vscode.TextDocument>();
906 private isSupported: boolean = true;
907 private inactiveRegionsDecorations = new Map<string, DecorationRangesPair>();
908 private settingsTracker: SettingsTracker;
909 private loggingLevel: number = 1;
910 private configurationProvider?: string;
911 private mergeConfigurations: boolean = false;
912 private includePath?: string[];
913 private defines?: string[];
914 private forcedInclude?: string[];
915 private browsePath?: string[];
916 private hoverProvider: HoverProvider | undefined;
917 private copilotHoverProvider: CopilotHoverProvider | undefined;
918 private copilotCompletionProvider?: CopilotCompletionContextProvider;
919
920 public lastCustomBrowseConfiguration: PersistentFolderState<WorkspaceBrowseConfiguration | undefined> | undefined;
921 public lastCustomBrowseConfigurationProviderId: PersistentFolderState<string | undefined> | undefined;
922 public lastCustomBrowseConfigurationProviderVersion: PersistentFolderState<Version> | undefined;
923 public currentCaseSensitiveFileSupport: PersistentWorkspaceState<boolean> | undefined;
924 public currentCopilotHoverEnabled: PersistentWorkspaceState<string> | undefined;
925 private registeredProviders: PersistentFolderState<string[]> | undefined;
926
927 private configStateReceived: ConfigStateReceived = { compilers: false, compileCommands: false, configProviders: undefined, timeout: false };
928 private showConfigureIntelliSenseButton: boolean = false;
929 private pendingTagParsingCalls: PendingTagParsingCall[] = [];
930
931 /** A queue of asynchronous tasks that need to be processed befofe ready is considered active. */
932 private static queue = new Array<[ManualPromise<unknown>, () => Promise<unknown>] | [ManualPromise<unknown>]>();
933
934 /** returns a promise that waits initialization and/or a change to configuration to complete (i.e. language client is ready-to-use) */
935 private static readonly isStarted = new ManualSignal<void>(true);
936
937 /**
938 * Indicates if the blocking task dispatcher is currently running
939 *
940 * This will be in the Set state when the dispatcher is not running (i.e. if you await this it will be resolved immediately)
941 * If the dispatcher is running, this will be in the Reset state (i.e. if you await this it will be resolved when the dispatcher is done)
942 */
943 private static readonly dispatching = new ManualSignal<void>();
944
945 // The "model" that is displayed via the UI (status bar).
946 private model: ClientModel = new ClientModel();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected