Open lucasrafael98 opened 1 year ago
This may be a related issue to #3335
Graphql injected into a javascript template string, some identifiers are highlighted with the @string
capture from javascript instead of the capture from graphql.
In both cases, the parent language highlight is overriding the injected language
Describe the highlighting problem
When injecting highlights into strings in a Go file, some identifiers keep the color used for strings in Go, instead of the color they should have if they were in a plain file of their own language. The below example shows this: HTML tags are green (string color) where in a plain HTML file they'd be white, and the same with the select_expression terms in the SQL string.
Color scheme used is https://github.com/ellisonleao/gruvbox.nvim, but it seems to apply to the default as well.
Example snippet that causes the problem
Tree-sitter parsing result
Example screenshot
Expected behavior
Colors I'd expect would be the same as the colors in a plain file:
Output of
:checkhealth nvim-treesitter
Output of
nvim --version
Also tested with the latest nightly build, same result:
Additional context
No response