aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Davis2023-03-27 06:27:38 +0000
committerGitHub2023-03-27 06:27:38 +0000
commitd7431db55cd076dbacfde2cebaed315509923df5 (patch)
treede599de10c828c70db07ba53afb9815f1343ced9
parent2af14a24abbd8de510f69e6569c18601533dc912 (diff)
Update tree-sitter-git-commit, add comment textobject (#6439)
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.
-rw-r--r--book/src/generated/lang-support.md2
-rw-r--r--languages.toml2
-rw-r--r--runtime/queries/git-commit/textobjects.scm2
3 files changed, 4 insertions, 2 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index 5cd0c8c1..003ed4a4 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -41,7 +41,7 @@
| fortran | ✓ | | ✓ | `fortls` |
| gdscript | ✓ | ✓ | ✓ | |
| git-attributes | ✓ | | | |
-| git-commit | ✓ | | | |
+| git-commit | ✓ | ✓ | | |
| git-config | ✓ | | | |
| git-ignore | ✓ | | | |
| git-rebase | ✓ | | | |
diff --git a/languages.toml b/languages.toml
index ae4135f0..7c6c278e 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 = "318dd72abfaa7b8044c1d1fbeabcd06deaaf038f" }
+source = { git = "https://github.com/the-mikedavis/tree-sitter-git-commit", rev = "7421fd81840950c0ff4191733cee3b6ac06cb295" }
[[language]]
name = "diff"
diff --git a/runtime/queries/git-commit/textobjects.scm b/runtime/queries/git-commit/textobjects.scm
new file mode 100644
index 00000000..4465c876
--- /dev/null
+++ b/runtime/queries/git-commit/textobjects.scm
@@ -0,0 +1,2 @@
+(comment) @comment.inside
+(comment)+ @comment.around