Skip to content

Commit

Permalink
Update tree-sitter-git-commit, add comment textobject (#6439)
Browse files Browse the repository at this point in the history
The update includes a fix for comments in commit messages where there
was no space separating the '#' and the comment text.

The comment textobject can be useful occasionally to jump to the
summary part of the commit edit message.
  • Loading branch information
the-mikedavis committed Mar 27, 2023
1 parent 2af14a2 commit d7431db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
| fortran || || `fortls` |
| gdscript |||| |
| git-attributes || | | |
| git-commit || | | |
| git-commit || | | |
| git-config || | | |
| git-ignore || | | |
| git-rebase || | | |
Expand Down
2 changes: 1 addition & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ text-width = 72

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

[[language]]
name = "diff"
Expand Down
2 changes: 2 additions & 0 deletions runtime/queries/git-commit/textobjects.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(comment) @comment.inside
(comment)+ @comment.around

0 comments on commit d7431db

Please sign in to comment.