feat: add gitconfig

This commit is contained in:
Amaan Qureshi 2023-03-09 18:07:54 -05:00
parent d2a7022d5d
commit 0db1cc348e
5 changed files with 60 additions and 0 deletions

View file

@ -223,6 +223,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [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] [gitconfig](https://github.com/the-mikedavis/tree-sitter-git-config) (maintained by @amaanq)
- [x] [gitignore](https://github.com/shunsambongi/tree-sitter-gitignore) (maintained by @theHamsta)
- [x] [gleam](https://github.com/gleam-lang/tree-sitter-gleam) (maintained by @amaanq)
- [x] [Glimmer and Ember](https://github.com/alexlafroscia/tree-sitter-glimmer) (maintained by @NullVoxPopuli)

View file

@ -149,6 +149,9 @@
"gitcommit": {
"revision": "f71b93f399c9c2b315825827c95466e7405ec622"
},
"git_config": {
"revision": "a01b498b25003d97a5f93b0da0e6f28307454347"
},
"gitignore": {
"revision": "f4685bf11ac466dd278449bcfe5fd014e94aa504"
},

View file

@ -516,6 +516,16 @@ list.gitcommit = {
maintainers = { "@gbprod" },
}
list.git_config = {
install_info = {
url = "https://github.com/the-mikedavis/tree-sitter-git-config",
files = { "src/parser.c" },
},
filetype = "gitconfig",
maintainers = { "@amaanq" },
readme_name = "gitconfig",
}
list.gitignore = {
install_info = {
url = "https://github.com/shunsambongi/tree-sitter-gitignore",

View file

View file

@ -0,0 +1,46 @@
; Sections
(section_name) @type
((section_name) @include
(#eq? @include "include"))
((section_header
(section_name) @include
(subsection_name))
(#eq? @include "includeIf"))
(variable (name) @property)
; Operators
[
"="
] @operator
; Literals
(integer) @number
[
(true)
(false)
] @boolean
(string) @string
((string) @text.uri
(#match? @text.uri "^(~|./|/)"))
(section_header
[
"\""
(subsection_name)
] @string.special)
; Punctuation
[ "[" "]" ] @punctuation.bracket
; Comments
(comment) @comment @spell