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

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 07:10:44 PDT 2019


ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts:113
   const semanticHighlightingFeature =
-      new semanticHighlighting.SemanticHighlightingFeature();
+      new semanticHighlighting.SemanticHighlightingFeature(
+          getConfig<boolean>('semanticHighlighting'));
----------------
Why not avoid calling `clangdClient.registerFeature` instead?
Would allow to:
- not change the `SemanticHighlightingFeature` class, keeping it simpler,
- ensure we do not do any extra work if the feature is disabled.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67096





More information about the cfe-commits mailing list