Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@
"category": "clangd",
"title": "Manually activate extension"
},
{
"command": "clangd.shutdown",
"category": "clangd",
"title": "Manually shutdown extension"
},
{
"command": "clangd.restart",
"category": "clangd",
Expand Down
6 changes: 5 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ export async function activate(context: vscode.ExtensionContext) {
// An empty place holder for the activate command, otherwise we'll get an
// "command is not registered" error.
context.subscriptions.push(
vscode.commands.registerCommand('clangd.activate', async () => {}));
vscode.commands.registerCommand('clangd.activate', async () => {
await clangdContext.activate(context.globalStoragePath, outputChannel);
}));
context.subscriptions.push(vscode.commands.registerCommand(
'clangd.shutdown', async () => { await clangdContext.dispose(); }));
context.subscriptions.push(
vscode.commands.registerCommand('clangd.restart', async () => {
await clangdContext.dispose();
Expand Down