aboutsummaryrefslogtreecommitdiffstats
path: root/queries/gitcommit
diff options
context:
space:
mode:
Diffstat (limited to 'queries/gitcommit')
-rw-r--r--queries/gitcommit/highlights.scm44
-rw-r--r--queries/gitcommit/injections.scm6
2 files changed, 35 insertions, 15 deletions
diff --git a/queries/gitcommit/highlights.scm b/queries/gitcommit/highlights.scm
index d475021c2..880d05e01 100644
--- a/queries/gitcommit/highlights.scm
+++ b/queries/gitcommit/highlights.scm
@@ -1,32 +1,52 @@
(comment) @comment
+
(generated_comment) @comment
+
(title) @markup.heading
+
; (text) @none
(branch) @markup.link
+
(change) @keyword
+
(filepath) @string.special.url
+
(arrow) @punctuation.delimiter
(subject) @markup.heading @spell
-(subject (overflow) @none @spell)
-(subject (subject_prefix) @function @nospell)
-(prefix (type) @keyword @nospell)
-(prefix (scope) @variable.parameter @nospell)
-(prefix [
+
+(subject
+ (overflow) @none @spell)
+
+(subject
+ (subject_prefix) @function @nospell)
+
+(prefix
+ (type) @keyword @nospell)
+
+(prefix
+ (scope) @variable.parameter @nospell)
+
+(prefix
+ [
"("
")"
":"
-] @punctuation.delimiter)
-(prefix [
- "!"
-] @punctuation.special)
+ ] @punctuation.delimiter)
+
+(prefix
+ "!" @punctuation.special)
(message) @spell
-(trailer (token) @label)
+(trailer
+ (token) @label)
+
; (trailer (value) @none)
+(breaking_change
+ (token) @comment.warning)
-(breaking_change (token) @comment.warning)
-(breaking_change (value) @none @spell)
+(breaking_change
+ (value) @none @spell)
(scissor) @comment
diff --git a/queries/gitcommit/injections.scm b/queries/gitcommit/injections.scm
index 5e56dfa5f..5613d7e8e 100644
--- a/queries/gitcommit/injections.scm
+++ b/queries/gitcommit/injections.scm
@@ -1,5 +1,5 @@
((diff) @injection.content
- (#set! injection.language "diff"))
+ (#set! injection.language "diff"))
-((rebase_command) @injection.content
- (#set! injection.language "git_rebase"))
+((rebase_command) @injection.content
+ (#set! injection.language "git_rebase"))