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

Highlight mutable variables #6659

Open
palango opened this issue Apr 8, 2023 · 4 comments
Open

Highlight mutable variables #6659

palango opened this issue Apr 8, 2023 · 4 comments
Labels
C-enhancement Category: Improvements

Comments

@palango
Copy link
Contributor

palango commented Apr 8, 2023

In VSCode mutable vars can be highlighted distinctly from immutable vars:
Screenshot 2023-04-08 at 20 51 30

This would be nice to have in Helix as well.

@palango palango added the C-enhancement Category: Improvements label Apr 8, 2023
@KMikeeU
Copy link
Contributor

KMikeeU commented Apr 10, 2023

That depends on your theme, you can reference and style the mut keyword using keyword.storage.modifier.mut

@SoraTenshi
Copy link
Contributor

i have already a pr that would somewhat addresses this.
I am not sure how i feel about selecting only mutable variables, as this would be pretty much only applicable to rust.

#6197

@palango
Copy link
Contributor Author

palango commented Apr 13, 2023

I am not sure how i feel about selecting only mutable variables, as this would be pretty much only applicable to rust.

The same distinction exists in other languages as well, like var and val in Kotlin, so I think it can be generalized.

@KMikeeU
Copy link
Contributor

KMikeeU commented Apr 13, 2023

it is only possible to color mut instead of variable name depending on mut type.

Is this maybe what this TODO by @archseer is referring to?

; TODO: variable.mut to highlight mutable identifiers via locals.scm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

3 participants