-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix token types to use LSP token types #367
Fix token types to use LSP token types #367
Conversation
The original implementation was half working, due to an incorrect interpretation of the standard. This commit fixes that, but also adds modifiers Fixes #366
36424ac
to
515436d
Compare
672e19a
to
72d58d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat to see how this works under-the-hood.
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/util/SemanticTokenizer.java
Show resolved
Hide resolved
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/util/SemanticTokenizer.java
Outdated
Show resolved
Hide resolved
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/util/SemanticTokenizer.java
Outdated
Show resolved
Hide resolved
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/util/SemanticTokenizer.java
Outdated
Show resolved
Hide resolved
Will this PR make syntax highlighting Rascal code itself better/different? (like numbers in Rascal code will now be distinct?) |
Yes, they will now be highlighted (since before they were just the regular text color). But it requires some further tuning to get a difference between the string literals and the numeric literals. |
I want to merge this, but the windows runner is crashing on something weird. same case for main branch. |
Quality Gate passedIssues Measures |
The original implementation was half working, due to an incorrect interpretation of the standard. This commits fixes that. For backwards compatibility: it still supports the legacy ones from rascal and also the wrong text-mate ones.
The rendering of Rascal is the same, except that string and numeric literals are now both highlighted as string (where before they were not highlighted). This is something we can only fix in the rascal grammar.
Also, side-effect, the list of tokens send to the client is less, as we only try and send those that have an
category
and not all the plain ones.Fixes #366
TODO: