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

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 29 17:20:17 PDT 2019


nridge updated this revision to Diff 222337.
nridge added a comment.
Herald added a subscriber: usaxena95.

Update to reflect changes to server side in D67536 <https://reviews.llvm.org/D67536>


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67537

Files:
  clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts


Index: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
===================================================================
--- clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
+++ clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
@@ -190,6 +190,18 @@
         // highlighting becomes weird in certain cases.
         rangeBehavior : vscode.DecorationRangeBehavior.ClosedClosed,
       };
+      if (scopes[0] == "meta.disabled") {
+        options.isWholeLine = true;
+        // TODO: Avoid hardcoding these colors.
+        options.light = {
+          color: "rgb(100, 100, 100)",
+          backgroundColor: "rgba(220, 220, 220, 0.3)"
+        };
+        options.dark = {
+          color: "rgb(100, 100, 100)",
+          backgroundColor: "rgba(18, 18, 18, 0.3)"
+        }
+      }
       return vscode.window.createTextEditorDecorationType(options);
     });
     this.getVisibleTextEditorUris().forEach((fileUri) =>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67537.222337.patch
Type: text/x-patch
Size: 1006 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190930/c2d7212e/attachment-0001.bin>


More information about the cfe-commits mailing list