feat: Add language support for nginx config files

pull/11823/head
Denis Gruzdev 2 months ago
parent f6d39cbc1d
commit a01338af30
No known key found for this signature in database
GPG Key ID: E3DFEC736900FDE2

@ -134,6 +134,7 @@
| move | ✓ | | | |
| msbuild | ✓ | | ✓ | |
| nasm | ✓ | ✓ | | |
| nginx | ✓ | | | |
| nickel | ✓ | | ✓ | `nls` |
| nim | ✓ | ✓ | ✓ | `nimlangserver` |
| nix | ✓ | ✓ | | `nil`, `nixd` |

@ -3810,3 +3810,17 @@ language-servers = ["circom-lsp"]
[[grammar]]
name = "circom"
source = { git = "https://github.com/Decurity/tree-sitter-circom", rev = "02150524228b1e6afef96949f2d6b7cc0aaf999e" }
[[language]]
name = "nginx"
scope = "source.nginx"
injection-regex = "nginx"
file-types = ["conf"]
roots = []
comment-token = "#"
indent = { tab-width = 4, unit = " " }
auto-format = false
[[grammar]]
name = "nginx"
source = { git = "https://gitlab.com/joncoole/tree-sitter-nginx", rev = "b4b61db443602b69410ab469c122c01b1e685aa0" }

@ -0,0 +1,44 @@
(comment) @comment
(number) @number
(metric) @number
(regex) @regex
(variable) @variable
(modifier) @operator
(simple_directive
name: (directive) @function)
(block_directive
name: (directive) @function)
(lua_block_directive
"access_by_lua_block" @function)
((generic) @constant.builtin
(#match? @constant.builtin "^(off|on)$"))
(generic) @string
(string) @string
(scheme) @string
(ipv4) @number
[
";"
] @delimiter
[
"{"
"}"
"("
")"
"["
"]"
] @punctuation.bracket
; Lua Debug
(lua_code) @definition.type

@ -0,0 +1,4 @@
; Script tags
((lua_code) @injection.content
(#set! injection.language "lua")
(#set! injection.combined))
Loading…
Cancel
Save