[PATCH] D67537: [clangd] Client-side support for inactive regions

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 24 01:41:47 PST 2020


hokein added a comment.

> Do you mean naming the scope something like `clangd.meta.disable` to make it clear it's a clangd extension?
> 
> (In that case, we might as well make it something more descriptive, like `clangd.preprocessor.inactive`. `meta` doesn't convey much information.)

yes, this was my suggestion.



================
Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:193
+      if (scopes[0] == "meta.disabled") {
+        this.inactiveDecorationIndex = index;
+        return vscode.window.createTextEditorDecorationType({
----------------
hmm, looks like clangd [omits](https://github.com/llvm/llvm-project/blob/master/clang-tools-extra/clangd/SemanticHighlighting.cpp#L454) the `InactiveCode` token.

I'd suggest we send it like other tokens, that will simplify the patch, we don't need the `inactiveDecorationIndex` and `isInactive`, I think it also helps when we migrate to the official implementation. WDYT?




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67537





More information about the cfe-commits mailing list