patstockwell / vim-monokai-tasty

VIM Colour scheme
390 stars 51 forks source link

Add support for nvim-treesitter highlight groups #35

Closed RobertBuhren closed 1 year ago

RobertBuhren commented 3 years ago

Hi, thanks for this awesome colorscheme, I have been using it for quite some time now. I recently started using neovim's treesitter syntax highlighting [1]. I was wondering whether you could add support for the highlight groups that are defined in [2].

Regards, Robert [1] https://github.com/nvim-treesitter/nvim-treesitter [2] https://github.com/nvim-treesitter/nvim-treesitter/blob/master/doc/nvim-treesitter.txt#L431

patstockwell commented 3 years ago

Thanks for opening an issue! Looking into it.

patstockwell commented 3 years ago

Hi @RobertBuhren , As I'm a TypeScript developer, I started with some TS highlights. See this commit -> 1e2b0a7a2e7c098205cb3c3940f455543970fcb1

The basic mappings exist, so you will get highlighting with Treesitter regardless, however, it's a pretty huge task to add colours for all languages. Each language will require tweaks by adding a prefixed name. I'll continue adding Treesitter definitions in future as I update for various languages.

Closing the issue for now. Feel free to open another if there is a specific language or piece of syntax that doesn't make sense for you.

Nequo commented 2 years ago

Note that there are generic highlight groups documented here: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/doc/nvim-treesitter.txt#L480. These would apply to all languages and as far as I know you would use the language specific groups to override anything that does not look right after inheritance.

polirritmico commented 1 year ago

This are my modifications for Python that I made using the Treesitter highlight groups. Maybe it could be useful: https://gist.github.com/polirritmico/97f784766305eaee5ad916d6444659c2

Sorry if this is not the correct place to post this. Thanks!

patstockwell commented 1 year ago

I've added more tree sitter support (thanks @polirritmico for the Python config, that's been added!). See this commit -> https://github.com/patstockwell/vim-monokai-tasty/commit/c6c25baf03e9a4ce039f20b72a0d9af1b03776e2

All languages are supported by default linking, but specific styling has been added now for:

Feel free to contribute more if you require it!