Skip to content

Commit

Permalink
goLanguageServer: remove redundant code action provider
Browse files Browse the repository at this point in the history
Fixes golang#247

Change-Id: I7b4a6bca3aa0868e5f40f6718147b4c0464da6d0
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/239284
Run-TryBot: Rebecca Stambler <[email protected]>
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
  • Loading branch information
stamblerre committed Jun 22, 2020
1 parent f5eb6ed commit 3124d50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/goLanguageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
} from 'vscode-languageclient';
import WebRequest = require('web-request');
import { extensionId } from './const';
import { GoCodeActionProvider } from './goCodeAction';
import { GoDefinitionProvider } from './goDeclaration';
import { toolExecutionEnvironment } from './goEnv';
import { GoHoverProvider } from './goExtraInfo';
Expand Down Expand Up @@ -334,6 +335,7 @@ function registerDefaultProviders(ctx: vscode.ExtensionContext) {
);
defaultLanguageProviders.push(vscode.languages.registerRenameProvider(GO_MODE, new GoRenameProvider()));
defaultLanguageProviders.push(vscode.workspace.onDidChangeTextDocument(parseLiveFile, null, ctx.subscriptions));
defaultLanguageProviders.push(vscode.languages.registerCodeActionsProvider(GO_MODE, new GoCodeActionProvider()));

for (const provider of defaultLanguageProviders) {
ctx.subscriptions.push(provider);
Expand Down
2 changes: 0 additions & 2 deletions src/goMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import vscode = require('vscode');
import { browsePackages } from './goBrowsePackage';
import { buildCode } from './goBuild';
import { check, notifyIfGeneratedFile, removeTestStatus } from './goCheck';
import { GoCodeActionProvider } from './goCodeAction';
import {
applyCodeCoverage, applyCodeCoverageToAllEditors, initCoverageDecorators, removeCodeCoverageOnFileSave,
toggleCoverageCurrentPackage, trackCodeCoverageRemovalOnFileChange, updateCodeCoverageDecorators
Expand Down Expand Up @@ -176,7 +175,6 @@ export function activate(ctx: vscode.ExtensionContext): void {
const testCodeLensProvider = new GoRunTestCodeLensProvider();
const referencesCodeLensProvider = new GoReferencesCodeLensProvider();

ctx.subscriptions.push(vscode.languages.registerCodeActionsProvider(GO_MODE, new GoCodeActionProvider()));
ctx.subscriptions.push(vscode.languages.registerCodeLensProvider(GO_MODE, testCodeLensProvider));
ctx.subscriptions.push(vscode.languages.registerCodeLensProvider(GO_MODE, referencesCodeLensProvider));
ctx.subscriptions.push(vscode.debug.registerDebugConfigurationProvider('go', new GoDebugConfigurationProvider()));
Expand Down

0 comments on commit 3124d50

Please sign in to comment.