[PATCH] D59817: [clangd] Add activate command to the vscode extension.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 26 05:34:15 PDT 2019
hokein created this revision.
hokein added a reviewer: ilya-biryukov.
Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric.
Herald added a project: clang.
This would help minizime the annoying part of not activating the extension
for .cu file.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D59817
Files:
clangd/clients/clangd-vscode/package.json
clangd/clients/clangd-vscode/src/extension.ts
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 () => {}));
}
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": [
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59817.192264.patch
Type: text/x-patch
Size: 1397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190326/d0e89620/attachment.bin>
More information about the cfe-commits
mailing list