From 686a1e2f311932c2fcfeee6e8384ab8ce959d618 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 10 Apr 2023 10:52:03 -0500 Subject: [PATCH] Update tree-sitter-git-commit (#6692) Trailers are now supported, for example 'Co-authored-by' or 'Signed-off-by'. Commits are also now recognized in message bodies. --- languages.toml | 2 +- runtime/queries/git-commit/highlights.scm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/languages.toml b/languages.toml index fa725aaf..479777f9 100644 --- a/languages.toml +++ b/languages.toml @@ -1194,7 +1194,7 @@ text-width = 72 [[grammar]] name = "git-commit" -source = { git = "https://github.com/the-mikedavis/tree-sitter-git-commit", rev = "bd0ca5a6065f2cada3ac6a82a66db3ceff55fa6b" } +source = { git = "https://github.com/the-mikedavis/tree-sitter-git-commit", rev = "db88cffa3952dd2328b741af5d0fc69bdb76704f" } [[language]] name = "diff" diff --git a/runtime/queries/git-commit/highlights.scm b/runtime/queries/git-commit/highlights.scm index 20f58ee5..319d7656 100644 --- a/runtime/queries/git-commit/highlights.scm +++ b/runtime/queries/git-commit/highlights.scm @@ -10,5 +10,9 @@ (change kind: "modified" @diff.delta) (change kind: "renamed" @diff.delta.moved) -[":" "->" (scissors)] @punctuation.delimiter +(trailer + key: (trailer_key) @variable.other.member + value: (trailer_value) @string) + +[":" "=" "->" (scissors)] @punctuation.delimiter (comment) @comment