kaicataldo / material.vim

🎨 A port of the Material color scheme for Vim/Neovim
MIT License
610 stars 71 forks source link

Add Treesitter support #61

Closed lmlorca closed 3 years ago

lmlorca commented 3 years ago

These are some basic treesitter highlights.

This is a screenshot of a React component without any extra plugins, no panglos or polyglot, just treesitter: image

Compared to VSCode Material: image

Please note, upstream nvim-treesitter is not using the TSAttribute highlight group and attributes will look like properties (fg) instead of purple, in the picture I'm using my fork and I already submitted a PR to nvim-treesitter, so that HTML and JSX attributes use TSAttribute (which I include here) instead of TSProperty.

Another thing to keep in mind, stuff like return, function or export is just queried as TSKeyword, very generic. I think it can also be improved upstream.

This is WIP, I think I included the most relevant highlight groups to have a decent highlight if you use nightly neovim with treesitter, but many groups are missing and I'm trying to learn what exactly each one do before including it.

kaicataldo commented 3 years ago

Very cool! I've marked this as a draft for now until it's ready for review. Thanks for working on this!