Closed martskins closed 3 years ago
I think the way to go here is use standard vim highlight groups, not LCN defined ones. If users want to define their own groups that's fine, but we have no reason to over engineer this I think. I'm gonna assume we take that path unless someone has a compelling reason not to do so.
For the sake of releasing this faster I'm gonna leave the default mappings of LSP tokens to vim highlight groups for a later PR. I'm a little undecided on what the proper mappings are so I guess it could be useful to get some more eyes on that front.
This PR implements the
textDocument/semanticTokens/full
LSP method and removes the old "deprecated" (didn't ever really land as an accepted feature of LSP) implementation.This also sets a default generic mapping of LSP token types to VIM highlight groups that will be merged with the user-provided language-id-specific semantic tokens mappings config which is used to decide which highlight group to assign to each token.
This is still a draft and there a few things left for this to be considered "working":
textDocument/semanticTokens/range
(this I believe we could leave out of the first release of this feature)~textDocument/semanticTokens/full/delta
(this could also be optional for the first release)~Closes #1193