Index: clang-tools-extra/trunk/clangd/clients/clangd-vscode/package.json =================================================================== --- clang-tools-extra/trunk/clangd/clients/clangd-vscode/package.json +++ clang-tools-extra/trunk/clangd/clients/clangd-vscode/package.json @@ -24,7 +24,8 @@ "onLanguage:c", "onLanguage:cpp", "onLanguage:objective-c", - "onLanguage:objective-cpp" + "onLanguage:objective-cpp", + "onCommand:clangd-vscode.activate" ], "main": "./out/src/extension", "scripts": { @@ -81,6 +82,10 @@ { "command": "clangd-vscode.switchheadersource", "title": "Switch between Source/Header" + }, + { + "command": "clangd-vscode.activate", + "title": "Manually activate clangd extension" } ], "keybindings": [ Index: clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts =================================================================== --- clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts +++ clang-tools-extra/trunk/clangd/clients/clangd-vscode/src/extension.ts @@ -139,4 +139,8 @@ status.clear(); } }) + // 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-vscode.activate', async () => {})); }