blob: 81ba639e6677ca63e70dbe208cff9ab5d261953b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
const vscode = require('vscode');
const { ErrorsWrapper, wrapError } = require('./errors');
const selectReceiver = require('./implement-interface');
const groupImports = require('./group-imports');
/**
* @param {vscode.ExtensionContext} context
*/
function activate(context) {
let wrapErrorCommand = vscode.commands.registerCommand('gotools.wrap-error', wrapError);
context.subscriptions.push(
vscode.languages.registerCodeActionsProvider(
'go',
new ErrorsWrapper(),
{
providedCodeActionKinds: [
vscode.CodeActionKind.RefactorRewrite
]
}
)
);
context.subscriptions.push(wrapErrorCommand);
context.subscriptions.push(vscode.commands.registerCommand("gotools.group-imports", groupImports))
context.subscriptions.push(vscode.commands.registerCommand("gotools.implement", selectReceiver));
}
// This method is called when your extension is deactivated
function deactivate() { }
module.exports = {
activate,
deactivate
}
|