提交 888431fc 编写于 作者: M Matt Bierner

Don't register TS/JS code lens providers twice

上级 49e2d762
......@@ -296,8 +296,9 @@ class LanguageProvider {
const selector = this.description.modeIds;
const config = workspace.getConfiguration(this.id);
const completionItemProvider = new (await import('./features/completionItemProvider')).default(client, this.typingsStatus, this.commandManager);
this.disposables.push(languages.registerCompletionItemProvider(selector, completionItemProvider, '.', '"', '\'', '/', '@'));
this.disposables.push(languages.registerCompletionItemProvider(selector,
new (await import('./features/completionItemProvider')).default(client, this.typingsStatus, this.commandManager),
'.', '"', '\'', '/', '@'));
this.disposables.push(languages.registerCompletionItemProvider(selector, new (await import('./features/directiveCommentCompletionProvider')).default(client), '@'));
......@@ -323,18 +324,18 @@ class LanguageProvider {
this.disposables.push(languages.registerCodeActionsProvider(selector, new (await import('./features/refactorProvider')).default(client, this.formattingOptionsManager, this.commandManager)));
this.registerVersionDependentProviders();
for (const modeId of this.description.modeIds) {
this.disposables.push(languages.registerWorkspaceSymbolProvider(new (await import('./features/workspaceSymbolProvider')).default(client, modeId)));
const referenceCodeLensProvider = new (await import('./features/referencesCodeLensProvider')).default(client, this.description.id);
referenceCodeLensProvider.updateConfiguration();
this.toUpdateOnConfigurationChanged.push(referenceCodeLensProvider);
this.disposables.push(languages.registerCodeLensProvider(selector, referenceCodeLensProvider));
const referenceCodeLensProvider = new (await import('./features/referencesCodeLensProvider')).default(client, modeId);
referenceCodeLensProvider.updateConfiguration();
this.toUpdateOnConfigurationChanged.push(referenceCodeLensProvider);
this.disposables.push(languages.registerCodeLensProvider(selector, referenceCodeLensProvider));
const implementationCodeLensProvider = new (await import('./features/implementationsCodeLensProvider')).default(client, this.description.id);
implementationCodeLensProvider.updateConfiguration();
this.toUpdateOnConfigurationChanged.push(implementationCodeLensProvider);
this.disposables.push(languages.registerCodeLensProvider(selector, implementationCodeLensProvider));
const implementationCodeLensProvider = new (await import('./features/implementationsCodeLensProvider')).default(client, modeId);
implementationCodeLensProvider.updateConfiguration();
this.toUpdateOnConfigurationChanged.push(implementationCodeLensProvider);
this.disposables.push(languages.registerCodeLensProvider(selector, implementationCodeLensProvider));
for (const modeId of this.description.modeIds) {
this.disposables.push(languages.registerWorkspaceSymbolProvider(new (await import('./features/workspaceSymbolProvider')).default(client, modeId)));
if (!this.description.isExternal) {
this.disposables.push(languages.setLanguageConfiguration(modeId, {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册