-
Notifications
You must be signed in to change notification settings - Fork 167
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
Adding semantic token support #159
Conversation
Maybe something like jetbrain's one dark theme? |
@jhossbach not bad, I'll take that suggestion for now. |
hey @navarasu, can we get this reviewed&pushed? I would love to use this colorscheme again! |
as they are almost types
@chomosuke Just for your information, I noticed string highlighting may not behave well with inline variables (in this example I have variable |
@chomosuke Can you please revert parameter colour change alone as it is not this PR scope? So that I can merge this code |
This reverts commit f7bf697.
@navarasu Done, shall I open param orange in another PR? |
@DoumanAsh you can use |
If we are changing the color, we need to check all language. I have handpicked all these color by checking look and feel on multiple languages. Raise it an issue, I will check it |
This reverts commit 3755c1c as it appears semantic token support has been added to onedark. navarasu/onedark.nvim#159
Fixes #156.
Fixes #140.
I wouldn't say I've made semantic tokens look good on every languages out there, but I do think this is good enough to be merged for now and be slowly improved later on. I do also think it is a significant improvement over how semantic tokens currently looks with nvim 0.9.
Here's how rust looks with treesitter only highlighting:
![without semantic token](https://user-images.githubusercontent.com/38484873/232219542-45f7aa87-9fdc-409b-ba39-6af2a60f3115.png)
Here's how the same piece of rust looks with semantic token but before this PR, as you can see, it's quite unsightly:
![before this PR](https://user-images.githubusercontent.com/38484873/232219734-48b76728-71e8-4706-b118-64d869f20034.png)
Here's how the same piece of rust looks with semantic token after this PR, notice how the doc test got syntax highlighting as it has been labeled by rust-analyzer:
![with semantic token](https://user-images.githubusercontent.com/38484873/232219896-4b019800-ae07-4878-a78e-fa3505fcaa63.png)
BTW, I don't think parameters should be red but I can't think of any better color other than white so I'm opened to suggestions.