This would make the client life (tracking the changes) easier.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 37085 Build 37084: arc lint + arc unit
Event Timeline
It feels a bit strange to be sending highlighting (even if they are empty) beyond eof. But I guess the proposal does not specify this and it would make life for the vscode extension (much) simpler.
Theia also does not crash from this and if we apply decorations to vscode outside the file nothing happens as well so I guess it should be fine. (even when vscode finally implements this feature into lsp)
Just had the comment about comparing HighlightigLine objects instead of using matchers but up to you.
clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp | ||
---|---|---|
625 | Maybe create the HighlightingLine objects for Line 3 and 4 and add them directly in the UnorderedElementsAre because then we don't have to create the matchers. |
clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp | ||
---|---|---|
625 | we prefer to use gtest matchers in the unittest as they are easier to understand, and provide better error messages (when the tests fail). |
Maybe create the HighlightingLine objects for Line 3 and 4 and add them directly in the UnorderedElementsAre because then we don't have to create the matchers.