aktersnurra / no-clown-fiesta.nvim

A dark gray colorscheme
342 stars 25 forks source link

CSS highlighting with treesitter #22

Open ddbrierton opened 1 year ago

ddbrierton commented 1 year ago

Hi again,

I was editing some CSS today when I realised that I hadn’t installed a CSS parser for treesitter. Once I did most of the file was just rendered in white.

Without treesitter:

Screenshot 2023-05-11 at 20 40 57

With treesitter:

Screenshot 2023-05-11 at 19 30 21

I know that no-clown-fiesta has a minimalist aesthetic but it did strike me that this was perhaps not intentional 😊.

I do appreciate that if you don’t write CSS (or use treesitter) this may be very low priority for you, in which case (and sorry to ask, but I’m new to neovim and still feeling my way around), is there a simple way to override some of the theme treesitter values from within the theme setup function, or after the theme has loaded? I know how to use :inspect to see how treesitter is classifying things.

aktersnurra commented 1 year ago

It looks correct, it probably has to do with that I "optimized" the color scheme for other languages. But I can have a look at the AST of CSS this weekend if I get the time, and see if I can come up with something a bit more colorful without breaking the scheme for other languages. Otherwise, and maybe the best solution, is that you override the colors for different highlight groups by adding them to a file called ftplugin/css.lua, here is the palette for the color scheme.