[PATCH] D67096: [clangd][vscode] Add a flag to enable semantic highlighting in clangd

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 07:22:23 PDT 2019


hokein updated this revision to Diff 218452.
hokein marked 2 inline comments as done.
hokein added a comment.

address the comment, don't register the feature.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67096/new/

https://reviews.llvm.org/D67096

Files:
  clang-tools-extra/clangd/clients/clangd-vscode/package.json
  clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts


Index: clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts
===================================================================
--- clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts
+++ clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts
@@ -113,7 +113,8 @@
       new semanticHighlighting.SemanticHighlightingFeature();
   context.subscriptions.push(
       vscode.Disposable.from(semanticHighlightingFeature));
-  clangdClient.registerFeature(semanticHighlightingFeature);
+  if (getConfig<boolean>('semanticHighlighting'))
+    clangdClient.registerFeature(semanticHighlightingFeature);
   console.log('Clang Language Server is now active!');
   context.subscriptions.push(clangdClient.start());
   context.subscriptions.push(vscode.commands.registerCommand(
Index: clang-tools-extra/clangd/clients/clangd-vscode/package.json
===================================================================
--- clang-tools-extra/clangd/clients/clangd-vscode/package.json
+++ clang-tools-extra/clangd/clients/clangd-vscode/package.json
@@ -89,6 +89,11 @@
                 "clangd.trace": {
                     "type": "string",
                     "description": "Names a file that clangd should log a performance trace to, in chrome trace-viewer JSON format."
+                },
+                "clangd.semanticHighlighting": {
+                    "type": "boolean",
+                    "default": "false",
+                    "description": "Enable semantic highlighting in clangd"
                 }
             }
         },


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67096.218452.patch
Type: text/x-patch
Size: 1563 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190903/e8d5ec0f/attachment.bin>


More information about the cfe-commits mailing list