feat: add hyprlang parser & queries (#5852)

Co-authored-by: Pham Huy Hoang <hoangtun0810@gmail.com>
This commit is contained in:
Luckas 2024-02-09 12:19:46 +03:00 committed by GitHub
parent 01c159826e
commit bc07e58f42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 75 additions and 0 deletions

View file

@ -270,6 +270,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [htmldjango](https://github.com/interdependence/tree-sitter-htmldjango) (experimental, maintained by @ObserverOfTime)
- [x] [http](https://github.com/rest-nvim/tree-sitter-http) (maintained by @amaanq)
- [x] [hurl](https://github.com/pfeiferj/tree-sitter-hurl) (maintained by @pfeiferj)
- [x] [hyprlang](https://github.com/luckasRanarison/tree-sitter-hyprlang) (maintained by @luckasRanarison)
- [x] [ini](https://github.com/justinmk/tree-sitter-ini) (experimental, maintained by @theHamsta)
- [x] [ispc](https://github.com/fab4100/tree-sitter-ispc) (maintained by @fab4100)
- [x] [janet_simple](https://github.com/sogaiu/tree-sitter-janet-simple) (maintained by @sogaiu)

View file

@ -290,6 +290,9 @@
"hurl": {
"revision": "cd1a0ada92cc73dd0f4d7eedc162be4ded758591"
},
"hyprlang": {
"revision": "e60fc858e6327a15c0b26f99ec96945fecd1e4ee"
},
"ini": {
"revision": "bcb84a2d4bcd6f55b911c42deade75c8f90cb0c5"
},

View file

@ -891,6 +891,14 @@ list.hurl = {
maintainers = { "@pfeiferj" },
}
list.hyprlang = {
install_info = {
url = "https://github.com/luckasRanarison/tree-sitter-hyprlang",
files = { "src/parser.c" },
},
maintainers = { "@luckasRanarison" },
}
list.ini = {
install_info = {
url = "https://github.com/justinmk/tree-sitter-ini",

View file

@ -0,0 +1 @@
(section) @fold

View file

@ -0,0 +1,56 @@
(comment) @comment @spell
[
"source"
"exec"
"exec-once"
] @keyword
(keyword
(name) @keyword)
(assignment
(name) @property)
(section
(name) @module)
(section
device: (device_name) @type)
(variable) @variable
"$" @punctuation.special
(boolean) @boolean
(mod) @constant
[
"rgb"
"rgba"
] @function.builtin
[
(number)
(legacy_hex)
(angle)
(hex)
] @number
"deg" @type
"," @punctuation.delimiter
[
"("
")"
"{"
"}"
] @punctuation.bracket
[
"="
"-"
"+"
] @operator

View file

@ -0,0 +1,6 @@
(section) @indent.begin
(section
"}" @indent.end)
"}" @indent.branch