Skip to content

Commit

Permalink
git-commit: fix highlight edge cases
Browse files Browse the repository at this point in the history
* branch message with current branch and diverged branch has been
  added to the parser
* scissors used in verbose commits are marked as a punctuation
  delimiter
    * we could use comment instead since they're visually the
      same but IMO this works better
  • Loading branch information
the-mikedavis committed Jun 29, 2022
1 parent 83d2c1e commit 3c86d1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ indent = { tab-width = 2, unit = " " }

[[grammar]]
name = "git-commit"
source = { git = "https://github.com/the-mikedavis/tree-sitter-git-commit", rev = "7ae23de633de41f8f5b802f6f05b6596df6d00c1" }
source = { git = "https://github.com/the-mikedavis/tree-sitter-git-commit", rev = "318dd72abfaa7b8044c1d1fbeabcd06deaaf038f" }

[[language]]
name = "git-diff"
Expand Down
2 changes: 1 addition & 1 deletion runtime/queries/git-commit/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
(change kind: "modified" @diff.delta)
(change kind: "renamed" @diff.delta.moved)

[":" "->"] @punctuation.delimeter
[":" "->" (scissors)] @punctuation.delimeter
(comment) @comment

0 comments on commit 3c86d1a

Please sign in to comment.