[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:24 PDT 2019


hokein 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'));
----------------
ilya-biryukov wrote:
> 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.
good point, done.


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