From 57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9 Mon Sep 17 00:00:00 2001 From: Pham Huy Hoang Date: Sat, 6 Jan 2024 15:05:50 +0900 Subject: chore: query formatting --- queries/gitcommit/highlights.scm | 44 +++++++++++++++++++++++++++++----------- queries/gitcommit/injections.scm | 6 +++--- 2 files changed, 35 insertions(+), 15 deletions(-) (limited to 'queries/gitcommit') 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")) -- cgit v1.2.3-70-g09d2