Closed samueloph closed 1 year ago
I was hoping to add some hierarchy, I've just been procrastinating 😄
I pushed 16d01ac5f22eb48f4c7b726a421bdc72ed4d4051 which organizes each dif --git a b
section into a block
node and introduces hunks
which are a sequence of hunk
. hunk
is then a location
and a changes
node. That changes
node groups together the addition
, deletion
and context
nodes in that hunk.
What do you think, will this work for context?
This is awesome! I can now get command
and location
in the context pop-up.
This is the configuration I've used:
cat /home/samueloph/.local/share/nvim/site/pack/packer/start/nvim-treesitter-context/queries/diff/context.scm
([
(block)
(hunk)
] @context)
Thank you!
addition
,deletion
andcontext
are not parsed underindex
,file_change
,new_file
,old_file
,location
...This makes it impossible (or at least hard) to add support for diff for the context plugin (https://github.com/nvim-treesitter/nvim-treesitter-context).
For reference: https://github.com/nvim-treesitter/nvim-treesitter-context/issues/302
Do you think it makes sense that
addition
,deletion
andcontext
should be child nodes of the diff's headers?