ocaml-lsp
ocaml-lsp copied to clipboard
Semantic highlighting doesn't check client capabilities before sending tokens
As title. Maybe a coding pattern should be adopted to enforce/encourage compatibility checking.
What problems does this cause on the client?
The displaying of semantic tokens even when a client wishes to opt out by indicating that it is not capable of displaying them.
In general, it's misbehavior to send messages without checking that the client has the appropriate capability (and likewise, for the client to send the server messages without checking server capabilities).
Makes sense.
We should check the following:
multilineTokenSupportoverlappingTokenSupport(I doubt we're sending overlapping tokens)formats(although there's only one specified format right now)tokenTypestokenModifiers