Details
- Reviewers
sammccall jvikstrom - Commits
- rGb7ec41556b9c: [clangd] Add a hidden tweak to annotate all highlighting tokens of the file.
rL365130: [clangd] Add a hidden tweak to annotate all highlighting tokens of the file.
rCTE365130: [clangd] Add a hidden tweak to annotate all highlighting tokens of the file.
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 34374 Build 34373: arc lint + arc unit
Event Timeline
clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp | ||
---|---|---|
16 | it would be nice to use the textmate class name rather than an arbitrary string here, it saves a level of indirection when verifying/debugging behavior | |
49 | These operations are contextual, it would be nice to root at the selected node. You should be able to do (approximately) this by walking up to the next decl and using it as the traversal scope - don't forget to reset it afterwards! (This is a bit hacky and invalidates the parent map, but it's a debug tweak so it should be OK) |
address comments:
- emit textmate scope names
- rescope to the selected node rather than TU decl.
clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp | ||
---|---|---|
17 | can we move this to SemanticHighlighting.h, and define getTextMateScopeLookupTable() in terms of it? It seems much more fundamental. | |
54 | This needs a comment | |
60 | nit: can you give the overridden traversal scope as narrow a scope as possible? (put it in a block, or just reset explicitly immediately afterwards?) I'm a little paranoid about this scope being reused. |
it would be nice to use the textmate class name rather than an arbitrary string here, it saves a level of indirection when verifying/debugging behavior