Closed smlx closed 5 months ago
In Neovim, applied queries are here : https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/gitcommit/highlights.scm
The ERROR node capture has been removed here: https://github.com/nvim-treesitter/nvim-treesitter/commit/107e61afb7129d637ea6c3c68b97a22194b0bf16 please refer to the PR comments to understand why it was removed : https://github.com/nvim-treesitter/nvim-treesitter/pull/5572
Anyway, if you want it back, you can create your own query (https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#adding-queries) by creating a queries/gitcommit/highlights.scm
file in your neovin config with this content :
; extends
(ERROR) @error
Oh that works perfectly. Thanks for the background info and for helping me understand nvim-treesitter
a bit better!
I would expect the second line to be highlighted with
@error
, but it is not. It does appear as anERROR
node in the tree, but there is no highlighting.Here's the non-treesitter default neovim highlighting to show what I would expect for the second line:
It looks like the highlighting might have been removed in #58 when this line was deleted from
highlights.scm
: