diff options
| author | Vladimir Levin <34550675+opa-oz@users.noreply.github.com> | 2024-07-17 16:47:59 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-17 09:47:59 +0200 |
| commit | 067415e9710526f6d8dccd4848f0c9a291b48edf (patch) | |
| tree | 14215948fda4c9e600b1783723ca71d5f05466a4 | |
| parent | feat: add indentation queries for angular (diff) | |
| download | nvim-treesitter-067415e9710526f6d8dccd4848f0c9a291b48edf.tar nvim-treesitter-067415e9710526f6d8dccd4848f0c9a291b48edf.tar.gz nvim-treesitter-067415e9710526f6d8dccd4848f0c9a291b48edf.tar.bz2 nvim-treesitter-067415e9710526f6d8dccd4848f0c9a291b48edf.tar.lz nvim-treesitter-067415e9710526f6d8dccd4848f0c9a291b48edf.tar.xz nvim-treesitter-067415e9710526f6d8dccd4848f0c9a291b48edf.tar.zst nvim-treesitter-067415e9710526f6d8dccd4848f0c9a291b48edf.zip | |
feat: add nginx
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | lockfile.json | 3 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 8 | ||||
| -rw-r--r-- | queries/nginx/folds.scm | 1 | ||||
| -rw-r--r-- | queries/nginx/highlights.scm | 59 | ||||
| -rw-r--r-- | queries/nginx/injections.scm | 2 |
6 files changed, 74 insertions, 0 deletions
@@ -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) diff --git a/lockfile.json b/lockfile.json index b8cae5a88..7edf39bba 100644 --- a/lockfile.json +++ b/lockfile.json @@ -452,6 +452,9 @@ "nasm": { "revision": "570f3d7be01fffc751237f4cfcf52d04e20532d1" }, + "nginx": { + "revision": "281d184b8240b2b22670b8907b57b6d6842db6f3" + }, "nickel": { "revision": "3039ad9e9af3c1ffe049a04ee83a2b489915b0b9" }, diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index bc42d79d6..db69132b4 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -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", diff --git a/queries/nginx/folds.scm b/queries/nginx/folds.scm new file mode 100644 index 000000000..fd7d23999 --- /dev/null +++ b/queries/nginx/folds.scm @@ -0,0 +1 @@ +(block) @fold diff --git a/queries/nginx/highlights.scm b/queries/nginx/highlights.scm new file mode 100644 index 000000000..58fcc0b14 --- /dev/null +++ b/queries/nginx/highlights.scm @@ -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 diff --git a/queries/nginx/injections.scm b/queries/nginx/injections.scm new file mode 100644 index 000000000..2f0e58eb6 --- /dev/null +++ b/queries/nginx/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) |
