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

CSS highlighting with treesitter #22

Open
ddbrierton opened this issue May 11, 2023 · 1 comment
Open

CSS highlighting with treesitter #22

ddbrierton opened this issue May 11, 2023 · 1 comment

Comments

@ddbrierton
Copy link

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
Copy link
Owner

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.

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