[clangd-dev] RFC: Semantic highlighting
Jan Korous via clangd-dev
clangd-dev at lists.llvm.org
Tue Jan 15 15:08:25 PST 2019
I am starting to work on semantic highlighting in clangd.
There's currently no mention of that in LSP but it seems like this proposal is on the right path to get accepted:
TLDR: the proposal introduces new capabilities and server notification.
- New client boolean capability flag.
- New server capability - server shares a lookup table of semantic categories with client in response.
- Semantic categories are defined by TextMate scopes. https://www.sublimetext.com/docs/3/scope_naming.html
- Server sends notifications containing line number, column number, length and semantic category (index in the lookup table).
- Server is responsible for sending only delta information (not full document every time).
- Server is responsible for ignoring trivial shift edits to documents (e. g. newline at the start of the document).
My intention is to implement interface from the proposal.
Does anyone have any thoughts on this?
More information about the clangd-dev