mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat: add gitcommit parser
This commit is contained in:
parent
fb4058448a
commit
118a87f7e7
4 changed files with 45 additions and 0 deletions
|
|
@ -210,6 +210,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
|||
- [x] [Godot (gdscript)](https://github.com/PrestonKnopp/tree-sitter-gdscript) (maintained by @Shatur95)
|
||||
- [x] [git_rebase](https://github.com/the-mikedavis/tree-sitter-git-rebase) (maintained by @gbprod)
|
||||
- [x] [gitattributes](https://github.com/ObserverOfTime/tree-sitter-gitattributes) (maintained by @ObserverOfTime)
|
||||
- [x] [gitcommit](https://github.com/gbprod/tree-sitter-gitcommit) (maintained by @gbprod)
|
||||
- [x] [gitignore](https://github.com/shunsambongi/tree-sitter-gitignore) (maintained by @theHamsta)
|
||||
- [x] [gleam](https://github.com/J3RN/tree-sitter-gleam) (maintained by @connorlay)
|
||||
- [x] [Glimmer and Ember](https://github.com/alexlafroscia/tree-sitter-glimmer) (maintained by @alexlafroscia)
|
||||
|
|
|
|||
|
|
@ -1253,6 +1253,15 @@ list.git_rebase = {
|
|||
maintainers = { "@gbprod" },
|
||||
}
|
||||
|
||||
list.gitcommit = {
|
||||
install_info = {
|
||||
url = "https://github.com/gbprod/tree-sitter-gitcommit",
|
||||
files = { "src/parser.c", "src/scanner.c" },
|
||||
branch = "main",
|
||||
},
|
||||
maintainers = { "@gbprod" },
|
||||
}
|
||||
|
||||
list.blueprint = {
|
||||
install_info = {
|
||||
url = "https://gitlab.com/gabmus/tree-sitter-blueprint.git",
|
||||
|
|
|
|||
33
queries/gitcommit/highlights.scm
Normal file
33
queries/gitcommit/highlights.scm
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
(comment) @comment
|
||||
(generated_comment) @comment
|
||||
(title) @text.title
|
||||
(text) @text
|
||||
(branch) @text.reference
|
||||
(change) @keyword
|
||||
(filepath) @text.uri
|
||||
(arrow) @punctuation.delimiter
|
||||
|
||||
(subject) @text.title
|
||||
(subject (overflow) @text)
|
||||
(prefix (type) @keyword)
|
||||
(prefix (scope) @parameter)
|
||||
(prefix [
|
||||
"("
|
||||
")"
|
||||
":"
|
||||
] @punctuation.delimiter)
|
||||
(prefix [
|
||||
"!"
|
||||
] @punctuation.special)
|
||||
|
||||
(message) @text
|
||||
|
||||
(trailer (token) @label)
|
||||
(trailer (value) @text)
|
||||
|
||||
(breaking_change (token) @text.warning)
|
||||
(breaking_change (value) @text)
|
||||
|
||||
(scissor) @comment
|
||||
|
||||
(ERROR) @error
|
||||
2
queries/gitcommit/injections.scm
Normal file
2
queries/gitcommit/injections.scm
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(diff) @diff
|
||||
(rebase_command) @git_rebase
|
||||
Loading…
Add table
Add a link
Reference in a new issue