-
Notifications
You must be signed in to change notification settings - Fork 133
Semantic highlighting #1903
Comments
We're limited by the LSP specification, which currently does not include syntactic highlighting. For VS Code as a client, they appear to be working on that for the client side, as their JS/TS support in the latest preview release includes it (https://code.visualstudio.com/updates/v1_42#_semantic-highlighting-for-typescript-javascript). Overall, we can't work on this until both the LSP and the client support it, as both sides lack the required APIs. |
@jakebailey I'm confused, isn't this exactly what the textDocument/documentHighlight request does? I thought that had been part of the LSP spec from the beginning. (I was considering switching to the Microsoft language server from the Palantir one, which already implements this, and noticed that this one unfortunately doesn't yet.) |
Nope, It's also not Real semantic highlighting has only recently been added to VS Code (only available in TS/JS, which are not LSP but bundled extensions). As far as I know, true semantic highlighting support is still a work in progress for the LSP spec. |
Oh, I see -- real semantic highlighting = adding colors to all the different parts of the code, regardless of where the cursor is. Makes sense. Glad to see #1767 is in progress. |
Note that the cursor thing is specifically a highlighted box in VS Code, not the color of the text itself. It's just a visual indicator. You can get it now, it will just be less exact. |
This is an awesome feature that could happen, is there any timeline for this? |
I think PyLance is doing something like this now. It's still pretty early (e.g. currently it colors |
I think |
for example nodejs language server has implemented this in microsoft/vscode-languageserver-node#367 |
I'm not sure how feasible this is but it would be really nice to have a semantic highlighting option, e.g. something like what pycharm has. I apologize in advance if this was discussed elsewhere but I didn't see any issues in this repo about it.
This could be particularly useful not when writing code for building libraries, but also when developing data analysis scripts/notebooks using the already great data-science features.
The text was updated successfully, but these errors were encountered: