on master help sign in
Update tree-sitter-git-rebase (#6030)
71220daSkyler Hawthorne
runtime/queries/git-rebase/highlights.scm+33−8
@@ -1,11 +1,36 @@
1+; a rough translation:
2+; * constant.builtin - git hash
3+; * constant - a git label
4+; * keyword - command that acts on commits commits
5+; * function - command that acts only on labels
6+; * comment - discarded commentary on a command, has no effect on the rebase
7+; * string - text used in the rebase operation
8+; * operator - a 'switch' (used in fixup and merge), either -c or -C at time of writing
9+
10+(((command) @keyword
11+ (label) @constant.builtin
12+ (message)? @comment)
1−(operation operator: ["p" "pick" "r" "reword" "e" "edit" "s" "squash" "m" "merge" "d" "drop" "b" "break" "x" "exec"] @keyword)
13+ (#match? @keyword "^(p|pick|r|reword|e|edit|s|squash|d|drop)$"))
2−(operation operator: ["l" "label" "t" "reset"] @function)
14+
3−(operation operator: ["f" "fixup"] @function.special)
15+(((command) @function
16+ (label) @constant
17+ (message)? @comment)
18+ (#match? @function "^(l|label|t|reset|u|update-ref)$"))
19+
20+((command) @keyword
21+ (#match? @keyword "^(x|exec|b|break)$"))
22+
23+(((command) @attribute
24+ (label) @constant.builtin
25+ (message)? @comment)
26+ (#match? @attribute "^(f|fixup)$"))
27+
28+(((command) @keyword
29+ (label) @constant.builtin
30+ (label) @constant
31+ (message) @string)
32+ (#match? @keyword "^(m|merge)$"))
4
33
5(option) @operator
34(option) @operator
6−(label) @string.special.symbol
7−(commit) @constant
8−"#" @punctuation.delimiter
9−(comment) @comment
10
35
11−(ERROR) @error
36+(comment) @comment
runtime/queries/git-rebase/injections.scm+5−4
@@ -1,4 +1,5 @@
1−((operation
1+(((command) @attribute
2− operator: ["x" "exec"]
3− (command) @injection.content)
2+ (message)? @injection.content)
3+ (#match? @attribute "^(x|exec)$")
4− (#set! injection.language "bash"))
4+ (#set! injection.language "bash")
5+)