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

Feature Request: Custom semantic selectors for global & block scoped variables #33

Open
AlexMax opened this issue Aug 24, 2024 · 1 comment

Comments

@AlexMax
Copy link

AlexMax commented Aug 24, 2024

There is a specific feature that I am taking advantage of in Visual Studio 2022 that I would very much like to replicate in Sublime Text.

In Visual C++ 2022, I have set up my color scheme to where block-scoped variables are red, class/struct member variables are light red, and global variables are white. With your plugin, I can get the proper color on class/struct members using the meta.semantic-token.property selector, but it does not appear that there is a more specific semantic selector than meta.semantic-token.variable for other types of variables.

Would it be possible to add a meta.semantic-token.variable.global and/or meta.semantic-token.variable.block selector?

@LDAP
Copy link
Collaborator

LDAP commented Aug 26, 2024

The semantic token types are defined by the LSP specification: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_semanticTokens

And the LSP plugin should support all of them. See https://lsp.sublimetext.io/customization/#semantic-highlighting

This plugin is a bridge to clangd where this need to be implemented. There is already an open issue for more semantic tokens: clangd/clangd#1115

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

No branches or pull requests

2 participants