Skip to content
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

ST API: Missing support for textDocument/semanticHighlighting #887

Closed
junknet opened this issue Feb 21, 2020 · 8 comments
Closed

ST API: Missing support for textDocument/semanticHighlighting #887

junknet opened this issue Feb 21, 2020 · 8 comments
Labels
sublime issue Issues related to shortcomings or bugs in the ST API

Comments

@junknet
Copy link

junknet commented Feb 21, 2020

I only see these scopes:{
markup.error
markup.warning
markup.info
markup.info.suggestion
}
It just for Diagnostics.
How do I get the LSP to analyze my code and return the type name.
for c++ code; such as function , module,struct,keyword.....
Then I can use these to customize my code color !

@rwols
Copy link
Member

rwols commented Feb 21, 2020

Both clangd and ccls already publish semantic highlighting. However this notification has not been standardized yet. That said, it's basically impossible to accomplish "dynamic" highlighting with the ST API. I'm not saying it will never happen, but you're swimming upstream if you would try to implement it at this time.

@rwols rwols added the sublime issue Issues related to shortcomings or bugs in the ST API label Feb 21, 2020
@rwols
Copy link
Member

rwols commented Apr 6, 2020

Looks like it's standardized for 3.16 of the protocol. https://github.com/microsoft/vscode-languageserver-node/blob/release/protocol/3.16.0-next.1/protocol/src/protocol.semanticTokens.proposed.ts

Perhaps we can experiment around with view.add_regions.

@rwols rwols added enhancement and removed sublime issue Issues related to shortcomings or bugs in the ST API labels Apr 6, 2020
@pushqrdx
Copy link

@rwols so it isn't possible to do as a plugin?

@rwols
Copy link
Member

rwols commented Aug 31, 2020

I'm not saying it's impossible, but likely it's going to be an uphill battle until there's a dedicated API for this in ST.

See: sublimehq/sublime_text#817

@pushqrdx
Copy link

pushqrdx commented Aug 31, 2020

@rwols yeah the workaround presented seems pretty ineffecient too. Did you try to directly ask the developers at discord? maybe they will consider adding a facility for region highlighting in ST 4

@rwols rwols added the sublime issue Issues related to shortcomings or bugs in the ST API label Aug 31, 2020
@rwols rwols changed the title Is there any way to achieve semantic highlighting ST API: Missing support for textDocument/semanticHighlighting Sep 1, 2020
@rwols rwols removed the enhancement label Nov 7, 2020
@predragnikolic
Copy link
Member

This issue can be closed now.

@rchl
Copy link
Member

rchl commented Mar 24, 2022

If so then I guess we need a more specific issue for tracking upstream support as current solution has many drawbacks.

@predragnikolic
Copy link
Member

I am subscribed to that issue at sublimehq/sublime_text#817

But yeah, if people start complaining about error underlines not being visible, due to semantic highlighting regions being drown on top of error regions, and vice versa, than yes. An issue for that will probably exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sublime issue Issues related to shortcomings or bugs in the ST API
Projects
None yet
Development

No branches or pull requests

5 participants