Skip to content

Commit 8672079

Browse files
authored
feat: Add gitcommit support (#261)
1 parent 2b932f9 commit 8672079

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,3 +430,9 @@
430430
branch = main
431431
update = none
432432
ignore = dirty
433+
[submodule "repos/gitcommit"]
434+
path = repos/gitcommit
435+
url = https://github.com/gbprod/tree-sitter-gitcommit
436+
branch = main
437+
update = none
438+
ignore = dirty

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
## Unreleased
4+
- Add `gitcommit` support
45

56
## 0.12.57 - 2023-10-05
67
- Add `gitignore` support

queries/gitcommit/highlights.scm

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
(comment) @comment
2+
(generated_comment) @comment
3+
(title) @text.title
4+
(text) @text
5+
(branch) @text.reference
6+
(change) @keyword
7+
(filepath) @text.uri
8+
(arrow) @punctuation.delimiter
9+
10+
(subject) @text.title
11+
(subject (overflow) @text)
12+
(prefix (type) @keyword)
13+
(prefix (scope) @parameter)
14+
(prefix [
15+
"("
16+
")"
17+
":"
18+
] @punctuation.delimiter)
19+
(prefix [
20+
"!"
21+
] @punctuation.special)
22+
23+
(message) @text
24+
25+
(trailer (token) @keyword)
26+
(trailer (value) @text)
27+
28+
(breaking_change (token) @text.warning)
29+
(breaking_change (value) @text)
30+
31+
(scissor) @comment
32+
33+
(ERROR) @error

repos/gitcommit

Submodule gitcommit added at 6856a5f

tree-sitter-langs.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ See `tree-sitter-langs-repos'."
126126
(f90-mode . fortran)
127127
(fortran-mode . fortran)
128128
(gdscript-mode . gdscript)
129+
(git-commit-mode . gitcommit)
129130
(gitattributes-mode . gitattributes)
130131
(gitignore-mode . gitignore)
131132
(go-mode . go)

0 commit comments

Comments
 (0)