[PATCH] D63559: [clang-tidy] Added functionality for getting semantic highlights for variable and function declarations

Johan Vikström via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 24 02:58:23 PDT 2019


jvikstrom marked 2 inline comments as done.
jvikstrom added inline comments.


================
Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:129
+std::vector<std::vector<std::string>> getSemanticScopes() {
+  return {{"variable"}, {"entity.name.function"}};
+}
----------------
hokein wrote:
> This is Textmate-specific, I think we should lift it to a new File (TextMate.cpp). We can do it in a separate patch.
> 
> I'd use a map to explicitly express the relationship between `SemanticScope` and TextMate scope, the current implementation is not obvious.
> 
> ```
> {SemanticScope::Function, "entity.name.function"},
> {SemanticScope::Variable, "variable.other"},
> ```
Will do this in CL when adding C++ ClangdServer api calls


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63559





More information about the cfe-commits mailing list