support for language server protocol semantic token

is there any support for language server protocol semantic token highlighting in codemirror?

No. But since the highlighter is an extension like any other, you could build a variant that works this way.

how is that doable? with ExternalTokenizer? or other stuff? can you be more specific please?
if it is with ExternalTokenizer, I belive it still needs to be specified in the lezer grammar, so wondering how it can be like lsp semantic token which is something computational that would sit on top of the grammar

I don’t really know, since I haven’t worked on it. I would imagine you’d get some kind of data structure from the server describing the tokens, and create decorations directly from that, without involving Lezer-style trees at all.

1 Like