Skip to content

Implement LSP semantic tokens protocol

Waqar Ahmed requested to merge work/lsp-semantic-tokens into master

This change implements the LSP semantic tokens protocol that has been introduced with LSP 3.16. Both full and fullDelta requests are implemented.

range request has not been implemented

For now modifiers are not handled, this is for three reasons

  • clangd doesn't support them yet and that is what I am testing against
  • For properly handling modifiers we may have to extend KSyntaxHighlighting
  • For now I am aiming to make it simple, solid and fast, modifier handling can be added later

I tested it with clangd and rust-analyzer. Both are working well, however with rust-analyzer on my computer, if you open a file it doesn't get highlighted immediately and only gets highlighted after an edit is made. Not sure why it behaves this way with rust-analyzer.

Signed-off-by: Waqar Ahmed waqar.17a@gmail.com

Edited by Waqar Ahmed

Merge request reports

Loading