feat: add nginx

This commit is contained in:
Vladimir Levin 2024-07-17 16:47:59 +09:00 committed by GitHub
parent 0d5e1214a5
commit 067415e971
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 74 additions and 0 deletions

View file

@ -324,6 +324,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [mlir](https://github.com/artagnon/tree-sitter-mlir) (experimental, maintained by @artagnon)
- [x] [muttrc](https://github.com/neomutt/tree-sitter-muttrc) (maintained by @Freed-Wu)
- [x] [nasm](https://github.com/naclsn/tree-sitter-nasm) (maintained by @ObserverOfTime)
- [x] [nginx](https://github.com/opa-oz/tree-sitter-nginx) (maintained by @opa-oz)
- [ ] [nickel](https://github.com/nickel-lang/tree-sitter-nickel)
- [x] [nim](https://github.com/alaviss/tree-sitter-nim) (maintained by @aMOPel)
- [x] [nim_format_string](https://github.com/aMOPel/tree-sitter-nim-format-string) (maintained by @aMOPel)

View file

@ -452,6 +452,9 @@
"nasm": {
"revision": "570f3d7be01fffc751237f4cfcf52d04e20532d1"
},
"nginx": {
"revision": "281d184b8240b2b22670b8907b57b6d6842db6f3"
},
"nickel": {
"revision": "3039ad9e9af3c1ffe049a04ee83a2b489915b0b9"
},

View file

@ -1329,6 +1329,14 @@ list.nasm = {
maintainers = { "@ObserverOfTime" },
}
list.nginx = {
install_info = {
url = "https://github.com/opa-oz/tree-sitter-nginx",
files = { "src/parser.c", "src/scanner.c" },
},
maintainers = { "@opa-oz" },
}
list.nickel = {
install_info = {
url = "https://github.com/nickel-lang/tree-sitter-nickel",

1
queries/nginx/folds.scm Normal file
View file

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

View file

@ -0,0 +1,59 @@
(comment) @comment @spell
(value) @variable
[
(location_modifier)
"="
] @operator
[
(keyword)
"location"
] @keyword
[
"if"
"map"
] @keyword.conditional
(boolean) @boolean
[
(auto)
(constant)
(level)
(connection_method)
(var)
(condition)
] @variable.builtin
[
(file)
(mask)
] @string.special.path
[
(string_literal)
(quoted_string_literal)
] @string
(directive
(variable
(keyword) @variable.parameter))
(location_route) @string.special
";" @punctuation.delimiter
[
(numeric_literal)
(time)
(size)
(cpumask)
] @number
[
"{"
"}"
] @punctuation.bracket

View file

@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))