dracula / vim

🧛🏻‍♂️ Dark theme for Vim
https://draculatheme.com/vim
MIT License
1.34k stars 454 forks source link

Issue with tree-sitter-css #288

Open tientrinh21 opened 2 years ago

tientrinh21 commented 2 years ago

Problem

Hello, I was trying to use treesitter these day, dracula works fine for me in HTML, JS and TS except CSS (with tree-sitter-css installed). All the class and properties appeared with no highlighting.

What happened

image

What I expected to happen

This is from neovim basic highlighting with css3 syntax plugins ('hail2u/vim-css3-syntax')

image

Machine Info

benknoble commented 2 years ago

EDIT: Derek clarified the situation below.

We're going to need more information to be helpful.

What is "tree-sitter-css"? And what highlight groups are applied to the unhighlighted portions? (You can see how to find out here or here, for example.)

Can you share a minimum reproducible example? You might look at How to debug my vimrc for tips on reducing your configuration to the minimum necessary to demonstrate the issue.

Since this is NeoVim, I'll ping @dsifford

dsifford commented 2 years ago

Yeah, I'm aware of this. We need someone to go in and take the time/effort to update the tree sitter groups specifically for css.

I've been meaning to get to it, but I so rarely use plain .css that it slips my mind.

PR encouraged if you feel up for it @tientrinh21

benknoble commented 2 years ago

Ah, seems I was missing some information. Thanks for clarifying Derek.

tientrinh21 commented 2 years ago

Oh, thank you for all of your replies. I guess using another plugin could be a temporary alternative while figuring with tree-sitter groups for CSS.

stnley commented 1 year ago

@dsifford Is the intent to duplicate, as needed, the groups already defined in after/syntax?

Pic below, left side tree-sitter disabled, right side tree-sitter enabled. 1698591528_grimshot

This is after :hi! link @property.css cssProp 1698592158_grimshot

It looks to me like the built-in syntax is more specific than the CSS tree-sitter queries. Pretty much everything is just @property.css. Feels like this is something that requires upstream to improve.