-
-
Notifications
You must be signed in to change notification settings - Fork 24
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 coloring #3
Comments
@jeapostrophe I think the LSP has already included semantic coloring, see link to VSCode docs. It would be cool to have something like this, regexes aren't very good for things like quasiquotes or macros. EDIT: Scratch that, it's still in the works. Maybe it's indeed better to wait till the proposal is merged. |
Once that's added (if it is), here's some resources on how to get the colorer from the #lang. You probably want to get the language info using: (define lang-info (read-language (open-input-string (send doc-text get-text))))
(lang-info 'color-lexer #f) The relevant docs can be found here. Based on this comment it seems the current 3.16 version of the LSP supports semantic coloring. I'm going to take a look into doing this and see if we can add this, since I think it's necessary to do coloring on the server side to support custom #langs. |
I'm interested in implement semantic tokens recently. For convenience, all tokens in specification. The meaning of tokens are be found at vscode's doc These are my rough idea: DesignSupported TokensThe following tokens will be supported
EDITED: use modifiers:
Requests
EDITED: should support refresh response PrototypeI wrote a simple prototype: snippet Note in this prototype, I used usage: racket pt.rkt filename Then it will print the tokens and their information in the order that they appear in the file. |
link PR: #133 |
This can be closed as complete now. |
Thanks! |
A proposal for LSP is in the works. eclipse-theia/theia#1845 microsoft/language-server-protocol#124
Here someone implemented the hack I initially proposed rust-lang/rls#85
The text was updated successfully, but these errors were encountered: