vim-monokai-tasty icon indicating copy to clipboard operation
vim-monokai-tasty copied to clipboard

Add support for nvim-treesitter highlight groups

Open RobertBuhren opened this issue 3 years ago • 2 comments

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

RobertBuhren avatar Jun 22 '21 09:06 RobertBuhren

Thanks for opening an issue! Looking into it.

patstockwell avatar Sep 19 '21 00:09 patstockwell

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.

patstockwell avatar Sep 22 '21 08:09 patstockwell

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.

Nequo avatar Sep 29 '22 16:09 Nequo

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!

polirritmico avatar Jun 21 '23 02:06 polirritmico

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:

  • TypeScript
  • Scala
  • Python

Feel free to contribute more if you require it!

patstockwell avatar Aug 31 '23 06:08 patstockwell