[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 4 00:37:14 PDT 2019


hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.

thanks, looks good.



================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.h:59
+  void onHighlightingsReady(PathRef File,
+                         std::vector<HighlightingToken> Highlightings) override;
 
----------------
nit: clang-format.


================
Comment at: clang-tools-extra/clangd/test/semantic-highlighting.test:36
+# CHECK-NEXT:      "renameProvider": true,
+# CHECK-NEXT:      "semanticHighlighting": {
+# CHECK-NEXT:        "scopes": [
----------------
nit: we could just verify this field like:

```
# CHECK:  "id": 0,
# CHECK:  " "semanticHighlighting": {
# CHECK-NEXT:        "scopes": [
# CHECK-NEXT:          [
# CHECK-NEXT:            "variable.cpp"
# CHECK-NEXT:          ],
# CHECK-NEXT:          [
# CHECK-NEXT:            "entity.name.function.cpp"
# CHECK-NEXT:          ]
# CHECK-NEXT:        ]
# CHECK-NEXT:      },
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63919





More information about the cfe-commits mailing list