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

Does the color scheme fully support treesitter #70

Closed
rockyzhang24 opened this issue Aug 18, 2021 · 13 comments
Closed

Does the color scheme fully support treesitter #70

rockyzhang24 opened this issue Aug 18, 2021 · 13 comments

Comments

@rockyzhang24
Copy link

Hello,

I really like this color scheme. Does it support treesitter now? Thank you.

@roosta
Copy link
Member

roosta commented Aug 18, 2021

Hi, I think so, I've heard from others that i works fine. Haven't tested it myself.

@rockyzhang24
Copy link
Author

Treesitter will improve every color scheme automatically, however it is not perfect. To fully support treesitter, the color scheme has to define the color groups brought by treesitter such as TSAtrribute, TSBoolean, and etc (referring to https://github.com/sainnhe/sonokai/blob/257500b85cc650c9606393021a001dfd58b46e88/colors/sonokai.vim#L324-L378). But I don't konw how to implement it for srcery-vim.

I love srcery so much and hope some contributors could implement this to make it fully support treesitter.

Thank you very much.

@roosta
Copy link
Member

roosta commented Aug 19, 2021

I'll get to work adding support, but it's gonna take me a little while. I have to use treesitter for a while to get a feel for what colors I want. I'll keep you posted on progress.

@rockyzhang24
Copy link
Author

Sounds great! Thank you.

@roosta
Copy link
Member

roosta commented Sep 3, 2021

Sorry about the holdup on this, I've been busy and haven't gotten around to it yet. If you wanna give it a go, please feel free to submit a PR, we can tweak it as we go.

@roosta
Copy link
Member

roosta commented Sep 4, 2021

Ok, I got started, I'm gonna setup a draft PR in a little bit.

@roosta
Copy link
Member

roosta commented Sep 4, 2021

#71

@rockyzhang24
Copy link
Author

Awesome. Thank you for your efforts. I am totally not familiar with the highlight setup however I will try to fiture out how it works by understanding others' code and see whether I can make some contributions.

@roosta
Copy link
Member

roosta commented Sep 4, 2021

Don't worry about it, if you have any requests, or changes you want included as part of treesitter, please add it as a comment in #71, and I'll see about adding it there for the time being :)

@roosta
Copy link
Member

roosta commented Sep 25, 2021

I just merged the treesitter branch. I've been using it for a good while now and it is working fine in the languages I generally frequent. Not sure about everything. Please try it out. And if you want to add anything, a helpful command turns out is :TSHighlightCapturesUnderCursor

I do not plan to further use tree sitter, so any additions are welcome.
Thanks.

@roosta
Copy link
Member

roosta commented Sep 25, 2021

Forgot to specify, that command isn't included in nvim-treesitter, I got it from here.

@rockyzhang24
Copy link
Author

Great. I will give it a shot. Thank you so much for your efforts.

Btw, why do you not plan to continue using tree-sitter? It's shipped with neovim and brings the improved syntax highlighting along with other helpful features. What's your concern? Thanks a lot.

@roosta
Copy link
Member

roosta commented Sep 25, 2021

Well, I actually plan to go back to regular vim. Been using neovim for a good lone while now and I am quite happy with it, but when I write plugins I still do that in vimscript, not lua. I initially started using neovim for colored under(line|curl), but I think that was patched in proper in latest vim. not super sure. but I dont really use any neovim spesific feature, so I might as well use vim.

I still prefer the way a lot of languages look without tree sitter, so nvim or not, I still don't think I'll use treesitter going forward.

@roosta roosta closed this as completed Jan 14, 2022
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