Index: clangd/clients/clangd-vscode/package.json =================================================================== --- clangd/clients/clangd-vscode/package.json +++ 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: clangd/clients/clangd-vscode/src/extension.ts =================================================================== --- clangd/clients/clangd-vscode/src/extension.ts +++ clangd/clients/clangd-vscode/src/extension.ts @@ -129,4 +129,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 () => {})); }