virchau13 / tree-sitter-astro

Tree-sitter grammar for the Astro web framework
MIT License
98 stars 9 forks source link

Missing HTML highlights in nvim #20

Closed lygamac closed 1 year ago

lygamac commented 1 year ago

Everything works but HTML highlights. Doesn't seem to happen to the Helix editor (which uses a fixed commit, perhaps some of the commit caused this?)

image

Parser/Features         H L F I J
  - astro               ✓ ✓ ✓ ✓ ✓
  - css                 ✓ . ✓ ✓ ✓
  - html                ✓ ✓ ✓ ✓ ✓
  - htmldjango          ✓ . ✓ ✓ ✓
  - tsx                 ✓ ✓ ✓ ✓ ✓
  - typescript          ✓ ✓ ✓ ✓ ✓
lygamac commented 1 year ago

https://github.com/nvim-treesitter/nvim-treesitter/issues/3497

virchau13 commented 1 year ago

Sorry for not responding earlier, I was a bit busy.

This issue isn't caused by that one, as the Astro parser does not use HTML injections, but rather copies the grammar rules directly.

virchau13 commented 1 year ago

This works perfectly fine on my machine, so it appears to be a configuration issue on your end. What's the output of :checkhealth? Do highlights in .html files work properly?

lygamac commented 1 year ago

Found the problem: The color scheme.

Indeed, .html has "no highlight" as well, but changing even to a built-in theme allows the highlighting to appear. Guess the colorscheme I am using is outdated.