aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/gitcommit
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/gitcommit')
-rw-r--r--runtime/queries/gitcommit/highlights.scm49
-rw-r--r--runtime/queries/gitcommit/injections.scm5
2 files changed, 54 insertions, 0 deletions
diff --git a/runtime/queries/gitcommit/highlights.scm b/runtime/queries/gitcommit/highlights.scm
new file mode 100644
index 000000000..b096056cc
--- /dev/null
+++ b/runtime/queries/gitcommit/highlights.scm
@@ -0,0 +1,49 @@
+(comment) @comment
+
+(generated_comment) @comment
+
+(title) @markup.heading
+
+; (text) @none
+(branch) @markup.link
+
+(change) @keyword
+
+(filepath) @string.special.path
+
+(arrow) @punctuation.delimiter
+
+(subject) @markup.heading @spell
+
+(subject
+ (subject_prefix) @function @nospell)
+
+(prefix
+ (type) @keyword @nospell)
+
+(prefix
+ (scope) @variable.parameter @nospell)
+
+(prefix
+ [
+ "("
+ ")"
+ ":"
+ ] @punctuation.delimiter)
+
+(prefix
+ "!" @punctuation.special)
+
+(message) @spell
+
+(trailer
+ (token) @label)
+
+; (trailer (value) @none)
+(breaking_change
+ (token) @comment.error)
+
+(breaking_change
+ (value) @none @spell)
+
+(scissor) @comment
diff --git a/runtime/queries/gitcommit/injections.scm b/runtime/queries/gitcommit/injections.scm
new file mode 100644
index 000000000..5613d7e8e
--- /dev/null
+++ b/runtime/queries/gitcommit/injections.scm
@@ -0,0 +1,5 @@
+((diff) @injection.content
+ (#set! injection.language "diff"))
+
+((rebase_command) @injection.content
+ (#set! injection.language "git_rebase"))