[PATCH] D66541: [clangd] Send highlighting diff beyond the end of the file.
Johan Vikström via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 22 01:44:05 PDT 2019
jvikstrom accepted this revision.
jvikstrom added a comment.
This revision is now accepted and ready to land.
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.
================
Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:625
+ testing::UnorderedElementsAre(
+ testing::AllOf(LineNumber(3), EmptyHighlightings()),
+ testing::AllOf(LineNumber(4), EmptyHighlightings())));
----------------
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66541/new/
https://reviews.llvm.org/D66541
More information about the cfe-commits
mailing list