-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement syntax highlighting #239
Comments
I don't think that LSPAnnotator is the right starting point for syntax highlighting/semantic tokens. It's used to display warnings and such. unfortunately syntax highlighting is so deeply integrated in intellij (PSI), i can't think of a way for us to use it. If anything i think we have do reimplement all highlighting by ourselves, which may be quite an undertaking unfortunately. This shouldn't stop you from trying of course ;). If you have a more concrete idea on how to implement semantic tokens, I#m happy to hear it. |
I think starting point should be SyntaxHighlighterBase. |
@nixel2007 that was what i was referring to. For intelliJ syntax highlighting you need an (syncronous) incremental Lexer. It's a cool thing but very low level. i don't know how to make it work in combination with LSP. If you have more knowledge about this i would be happy to hear it. |
Via My suggestion is to use an analog approach like for Annotations/Diagnostics. Implement the highlighting via |
every SemanticToken Type would be a token of the emulated lexer. incremental lexer is supported but not necessary if i remember it correctly. |
LSP 3.16 is published with support for SemanticTokens.
Starting point is the ExternalAnnotatorLSPAnnotator
.The text was updated successfully, but these errors were encountered: