Improve diff syntax highlighting queries (#21740)
Brings over the improvements made for the same grammar: https://github.com/nvim-treesitter/nvim-treesitter/pull/6619. Related to #19986 but not really- the problem brought up there is an issue of themes not supporting the `diff.plus` and `diff.minus` captures (already used before this PR). <details><summary>Theme previews (before/after)</summary> | Before | After | | --- | --- | |  |  | | Before | After | | --- | --- | |  |  | | Before | After | | --- | --- | |  |  | | Before | After | | --- | --- | |  |  | | Before | After | | --- | --- | |  |  | </details> Release Notes: - Improved diff syntax highlighting
This commit is contained in:
parent
e778635487
commit
9a806f98e6
1 changed files with 34 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
(comment) @comment
|
||||
|
||||
[
|
||||
(addition)
|
||||
(new_file)
|
||||
|
@ -12,4 +14,35 @@
|
|||
|
||||
(location) @attribute
|
||||
|
||||
(command) @function
|
||||
(command
|
||||
"diff" @function
|
||||
(argument) @variable.parameter)
|
||||
|
||||
(filename) @string.special.path
|
||||
|
||||
(mode) @number
|
||||
|
||||
([
|
||||
".."
|
||||
"+"
|
||||
"++"
|
||||
"+++"
|
||||
"++++"
|
||||
"-"
|
||||
"--"
|
||||
"---"
|
||||
"----"
|
||||
] @punctuation.special)
|
||||
|
||||
[
|
||||
(binary_change)
|
||||
(similarity)
|
||||
(file_change)
|
||||
] @label
|
||||
|
||||
(index
|
||||
"index" @keyword)
|
||||
|
||||
(similarity
|
||||
(score) @number
|
||||
"%" @number)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue