aboutsummaryrefslogtreecommitdiffstats
path: root/queries/gitcommit
diff options
context:
space:
mode:
authorPham Huy Hoang <hoangtun0810@gmail.com>2024-01-06 15:05:50 +0900
committerChristian Clason <c.clason@uni-graz.at>2024-01-19 16:58:37 +0100
commit57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9 (patch)
tree70bf645539882b88e6fa129cefd30986b89bbac3 /queries/gitcommit
parentci: add query lint job (diff)
downloadnvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.gz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.bz2
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.lz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.xz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.zst
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.zip
chore: query formatting
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"))