aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Davis2023-04-10 15:52:03 +0000
committerGitHub2023-04-10 15:52:03 +0000
commit686a1e2f311932c2fcfeee6e8384ab8ce959d618 (patch)
tree0c297974318fe49e9e4c51432542f34db515b9a5
parent5106a124edc738d5add32a7a862124b9b715e320 (diff)
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.
-rw-r--r--languages.toml2
-rw-r--r--runtime/queries/git-commit/highlights.scm6
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