diff options
| -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/hyprlang/folds.scm | 1 | ||||
| -rw-r--r-- | queries/hyprlang/highlights.scm | 56 | ||||
| -rw-r--r-- | queries/hyprlang/indents.scm | 6 |
6 files changed, 75 insertions, 0 deletions
@@ -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) diff --git a/lockfile.json b/lockfile.json index a44949ec6..9cb6fc9b9 100644 --- a/lockfile.json +++ b/lockfile.json @@ -290,6 +290,9 @@ "hurl": { "revision": "cd1a0ada92cc73dd0f4d7eedc162be4ded758591" }, + "hyprlang": { + "revision": "e60fc858e6327a15c0b26f99ec96945fecd1e4ee" + }, "ini": { "revision": "bcb84a2d4bcd6f55b911c42deade75c8f90cb0c5" }, diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 74e0be0f2..45bf2b784 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -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", diff --git a/queries/hyprlang/folds.scm b/queries/hyprlang/folds.scm new file mode 100644 index 000000000..911798f5a --- /dev/null +++ b/queries/hyprlang/folds.scm @@ -0,0 +1 @@ +(section) @fold diff --git a/queries/hyprlang/highlights.scm b/queries/hyprlang/highlights.scm new file mode 100644 index 000000000..d76993d12 --- /dev/null +++ b/queries/hyprlang/highlights.scm @@ -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 diff --git a/queries/hyprlang/indents.scm b/queries/hyprlang/indents.scm new file mode 100644 index 000000000..731ae9a61 --- /dev/null +++ b/queries/hyprlang/indents.scm @@ -0,0 +1,6 @@ +(section) @indent.begin + +(section + "}" @indent.end) + +"}" @indent.branch |
