aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/gitcommit
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-06-12 09:54:30 -0600
committerChristian Clason <c.clason@uni-graz.at>2025-05-12 18:43:40 +0200
commit692b051b09935653befdb8f7ba8afdb640adf17b (patch)
tree167162b6b129ae04f68c5735078521a72917c742 /runtime/queries/gitcommit
parentfeat(c-family): inherit injections (diff)
downloadnvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.gz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.bz2
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.lz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.xz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.zst
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.zip
feat!: drop modules, general refactor and cleanup
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"))