-
Notifications
You must be signed in to change notification settings - Fork 54
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
Semantic Tokens from LSP are not recognized and not colored #821
Comments
Are there any "default" token names in Eclipse that every theme has to implement? |
I think it's the good approach. However, please keep in mind that the tokens are not defined in Eclipse, but here they would be defined in the TextMate themes. Please see example themes https://github.com/eclipse/tm4e/tree/main/org.eclipse.tm4e.ui/themes to see what are the usual tokens defined in a TextMate grammar and evaluate how LSP4E SemanticTokens can be mapped there. |
hi @mickaelistria |
Supporting semantic highlight when TextMate is not configured to provide colors for an editor would require a configuration option because currently LSP4E is a participant on reconciliation initiated by TexMate and I do not think we can detect that TextMate is not used so that we start our own reconciliation. If TextMate is configured to provide colors for an editor, it provides already highlight for keywords, and LSP4E would use that highlight as well, I think that is good enough. Or is this not working for you? |
Following the discussion in #274 I create this issue.
Semantic tokens received from the language server are not recognised and mapped to an appropriate colour. Therefore, the files remain black and white without any additional TextMate grammar.
By manually defining a theme that maps the LSP tokens to appropriate colours, the files will appear coloured. This should not be done by the developer of a plugin, but rather in lsp4e.
My first approach would be to map the LSP tokens to the corresponding tokens in eclipse. This way it is possible to change the colours by changing the active theme. Otherwise this would not be possible by defining static colours for a token.
Is there a list of supported token names in Eclipse?
What is the minimum set of tokens that each theme needs to define?
What other approaches might we discuss?
The text was updated successfully, but these errors were encountered: