diff options
| author | ShootingStarDragons <ShootingStarDragons@protonmail.com> | 2022-08-23 18:52:45 +0800 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-08-26 11:55:16 -0700 |
| commit | d4ca2c679104a598f9cc0cb2a1f47de04bfa1ad9 (patch) | |
| tree | 057ff76641f94e4fe5e55503203ce147d5d095a2 | |
| parent | feat(viml): update queries (diff) | |
| download | nvim-treesitter-d4ca2c679104a598f9cc0cb2a1f47de04bfa1ad9.tar nvim-treesitter-d4ca2c679104a598f9cc0cb2a1f47de04bfa1ad9.tar.gz nvim-treesitter-d4ca2c679104a598f9cc0cb2a1f47de04bfa1ad9.tar.bz2 nvim-treesitter-d4ca2c679104a598f9cc0cb2a1f47de04bfa1ad9.tar.lz nvim-treesitter-d4ca2c679104a598f9cc0cb2a1f47de04bfa1ad9.tar.xz nvim-treesitter-d4ca2c679104a598f9cc0cb2a1f47de04bfa1ad9.tar.zst nvim-treesitter-d4ca2c679104a598f9cc0cb2a1f47de04bfa1ad9.zip | |
feat(meson): add support for meson
Log: meson build
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 11 | ||||
| -rw-r--r-- | queries/meson/folds.scm | 9 | ||||
| -rw-r--r-- | queries/meson/highlights.scm | 72 |
3 files changed, 92 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 2031e69b5..edc062edb 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -54,6 +54,17 @@ list.agda = { filetype = "agda", maintainers = { "@Decodetalkers" }, } + +list.meson = { + install_info = { + url = "https://github.com/Decodetalkers/tree-sitter-meson", + branch = "master", + files = { "src/parser.c" }, + }, + filetype = "meson", + maintainers = { "@Decodetalkers" }, +} + list.qmljs = { install_info = { url = "https://github.com/yuja/tree-sitter-qmljs", diff --git a/queries/meson/folds.scm b/queries/meson/folds.scm new file mode 100644 index 000000000..bb6c3c877 --- /dev/null +++ b/queries/meson/folds.scm @@ -0,0 +1,9 @@ +[ + (normal_command) + (if_condition) + (if_command) + (else_command) + (elseif_command) + (foreach_command) + (list) +] @fold diff --git a/queries/meson/highlights.scm b/queries/meson/highlights.scm new file mode 100644 index 000000000..4f842b45b --- /dev/null +++ b/queries/meson/highlights.scm @@ -0,0 +1,72 @@ +(comment) @comment +(number) @number +(bool) @boolean + +[ + "(" + ")" + "{" + "}" + "[" + "]" +] +@punctuation.bracket + +[ + "and" + "not" + "or" + "in" +] @keyword.operator + +[ + "=" + "==" + "!=" + "+" + "/" + "/=" + "+=" + "-=" + ">" + ">=" +] @operator + +[ + "if" + "elif" + "else" + "endif" +] @conditional + +[ + "foreach" + "endforeach" + (keyword_break) + (keyword_continue) +] @repeat + +;;; format +(string) @string +["@"] @punctuation.special + +(experession_statement + object: (identifier) @variable) + +(normal_command + command: (identifier) @function) + +(list + variable: (identifier) @variable) + +(formatunit + variable: (identifier) @variable) + +(variableunit + value: (identifier) @variable) +(pair + key: (identifier) @property) +(pair + value: (identifier) @variable) + +(escape_sequence) @string.escape |
