Skip to content

Enable SemanticTokens on the client #3321

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

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

kjeremy
Copy link
Contributor

@kjeremy kjeremy commented Feb 26, 2020

This will crash the extension on stable and insiders without the "--enable-proposed-api matklad.rust-analyzer" command line switch.

See #3159 (comment)

This will crash the extension on stable and insiders without the "--enable-proposed-api matklad.rust-analyzer" command line switch.
@matklad
Copy link
Member

matklad commented Feb 26, 2020

I think we can just hide this behind a config setting. I am more worried that it's impossible to publish an extension with proposed API....

@kjeremy
Copy link
Contributor Author

kjeremy commented Feb 26, 2020 via email

@matklad
Copy link
Member

matklad commented Feb 26, 2020

I'll merge this and add a config flag

@matklad matklad merged commit 8c0d089 into rust-lang:master Feb 26, 2020
@kjeremy kjeremy deleted the semantic-client branch February 26, 2020 15:02
@kjeremy
Copy link
Contributor Author

kjeremy commented Feb 26, 2020

@matklad there is a editor.semanticHighlighting.enabled settings in vscode... maybe we could key off that? I am assuming the feature will once stabilized.

@matklad
Copy link
Member

matklad commented Feb 26, 2020

Hm, I would assume that it means some entirely different thing: it's stable while the feature itself is preview. Is this about handle_document_highlight perhaps?

@kjeremy
Copy link
Contributor Author

kjeremy commented Feb 26, 2020

I don't think so (see https://github.com/microsoft/vscode/wiki/Semantic-Highlighting-Overview, which also shows us how to support new token types and modifiers). handle_document_highlight is for textDocument/documentHighlight which fuzzily highlights a symbol with optional read/write.

@matklad
Copy link
Member

matklad commented Feb 26, 2020

yeah, you are right. Still, I think it makes sense to stick with plugin-specific default. Maybe someone want to use semantic tokens for Java, but not Rust.

Also, I am playing with this functionality now, and it is super awesome. Thank you @kjeremy for spearheading this! I've also pushed https://github.com/rust-analyzer/minimal-rust to disable textmate based highlighting, for debuggin.

@runbmp runbmp mentioned this pull request Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants