mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
[typescript-language-features] Add option for excluding library symbols in "Go to Symbol in Workspace" (#192798)
* add option for excluding library symbols * clarify in message that new option requires ts 5.3 * remove expect error
This commit is contained in:
committed by
GitHub
parent
ca3b12f580
commit
f563e33800
@@ -122,6 +122,7 @@ export interface TypeScriptServiceConfiguration {
|
||||
readonly enableTsServerTracing: boolean;
|
||||
readonly localNodePath: string | null;
|
||||
readonly globalNodePath: string | null;
|
||||
readonly workspaceSymbolsExcludeLibrarySymbols: boolean;
|
||||
}
|
||||
|
||||
export function areServiceConfigurationsEqual(a: TypeScriptServiceConfiguration, b: TypeScriptServiceConfiguration): boolean {
|
||||
@@ -158,6 +159,7 @@ export abstract class BaseServiceConfigurationProvider implements ServiceConfigu
|
||||
enableTsServerTracing: this.readEnableTsServerTracing(configuration),
|
||||
localNodePath: this.readLocalNodePath(configuration),
|
||||
globalNodePath: this.readGlobalNodePath(configuration),
|
||||
workspaceSymbolsExcludeLibrarySymbols: this.readWorkspaceSymbolsExcludeLibrarySymbols(configuration),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -255,4 +257,8 @@ export abstract class BaseServiceConfigurationProvider implements ServiceConfigu
|
||||
private readWebProjectWideIntellisenseSuppressSemanticErrors(configuration: vscode.WorkspaceConfiguration): boolean {
|
||||
return configuration.get<boolean>('typescript.tsserver.web.projectWideIntellisense.suppressSemanticErrors', true);
|
||||
}
|
||||
|
||||
private readWorkspaceSymbolsExcludeLibrarySymbols(configuration: vscode.WorkspaceConfiguration): boolean {
|
||||
return configuration.get<boolean>('typescript.workspaceSymbols.excludeLibrarySymbols', true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -558,6 +558,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
||||
providePrefixAndSuffixTextForRename: true,
|
||||
allowRenameOfImportPath: true,
|
||||
includePackageJsonAutoImports: this._configuration.includePackageJsonAutoImports,
|
||||
excludeLibrarySymbolsInNavTo: this._configuration.workspaceSymbolsExcludeLibrarySymbols,
|
||||
},
|
||||
watchOptions
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user