aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queries/git-commit/highlights.scm4
-rw-r--r--runtime/queries/git-commit/injections.scm13
-rw-r--r--runtime/queries/git-diff/highlights.scm6
3 files changed, 10 insertions, 13 deletions
diff --git a/runtime/queries/git-commit/highlights.scm b/runtime/queries/git-commit/highlights.scm
index a74bb381..ffcc31ae 100644
--- a/runtime/queries/git-commit/highlights.scm
+++ b/runtime/queries/git-commit/highlights.scm
@@ -13,7 +13,3 @@
[":" "->"] @punctuation.delimeter
(comment) @comment
-
-; once we have diff injections, @comment should become @none
-((comment (scissors))
- (message)+ @comment)
diff --git a/runtime/queries/git-commit/injections.scm b/runtime/queries/git-commit/injections.scm
index 2837a586..bd96f1de 100644
--- a/runtime/queries/git-commit/injections.scm
+++ b/runtime/queries/git-commit/injections.scm
@@ -1,12 +1,7 @@
-; once a diff grammar is available, we can inject diff highlighting into the
-; trailer after scissors (git commit --verbose)
-; see https://github.com/helix-editor/helix/pull/1338#issuecomment-1000013539
-;
-; ((comment (scissors))
-; (message) @injection.content
-; (#set! injection.language "diff"))
-
-; ---
+((comment (scissors))
+ (message) @injection.content
+ (#set! injection.include-children)
+ (#set! injection.language "diff"))
; once a rebase grammar is available, we can inject rebase highlighting into
; interactive rebase summary sections like so:
diff --git a/runtime/queries/git-diff/highlights.scm b/runtime/queries/git-diff/highlights.scm
new file mode 100644
index 00000000..1c1a8829
--- /dev/null
+++ b/runtime/queries/git-diff/highlights.scm
@@ -0,0 +1,6 @@
+[(addition) (new_file)] @diff.plus
+[(deletion) (old_file)] @diff.minus
+
+(commit) @constant
+(location) @attribute
+(command) @markup.bold