-
Notifications
You must be signed in to change notification settings - Fork 395
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
feat(semantic_tokens): link readonly variables to Constant #331
Conversation
Can you use And probably better to drop |
hmm, I'm not actually sure about your suggested change. Can you show me a before/after of what you are trying to fix? In typescript for example |
Sure
Tbh, I'm not super familiar with the new semantic_tokens but I found a gist that seems to give me a rough idea, agreeing with what you said:
gist is here: https://gist.github.com/swarn/fb37d9eefe1bc616c2a7e476c0bc0316 So, I agree with removing the The problem I want to fix (before and after): I applied your suggestions now, let me know how |
Wow! That fixed another bug I always wondered about but didn't bother to look into: Before your fix, variables would just be highlighted to whatever was the capture above it if any (white by default usually as it wouldn't be inside a capture, just a node). So before, var would be green like the string, which I didn't notice happen in other themes. However... Builtin vars such as Highlighting |
I had to do my earlier change a bit different, since it broke in some places. I now simply define |
console highlighting (treesitter) is now back, but so is that initial thing you wanted to fix. tbh, I kinda like how that highlights. The |
In fact, I'd like your opinion here then.. as I introduced that separate highlighting change (I am not a big JS/TS user) |
Forgot one :)