mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-08-17 03:50:21 +03:00
feat(lang): add Meson language support (#2314)
https://mesonbuild.com/Syntax.html
This commit is contained in:
parent
807cdc60bf
commit
2cb1ea7127
@ -53,6 +53,7 @@
|
||||
| lua | ✓ | | ✓ | |
|
||||
| make | ✓ | | | |
|
||||
| markdown | ✓ | | | |
|
||||
| meson | ✓ | | ✓ | |
|
||||
| mint | | | | `mint` |
|
||||
| nickel | ✓ | | ✓ | `nls` |
|
||||
| nix | ✓ | | ✓ | `rnix-lsp` |
|
||||
|
@ -1342,3 +1342,16 @@ indent = { tab-width = 4, unit = " " }
|
||||
[[grammar]]
|
||||
name = "odin"
|
||||
source = { git = "https://github.com/MineBill/tree-sitter-odin", rev = "da885f4a387f169b9b69fe0968259ee257a8f69a" }
|
||||
|
||||
[[language]]
|
||||
name = "meson"
|
||||
scope = "source.meson"
|
||||
injection-regex = "meson"
|
||||
file-types = ["meson.build"]
|
||||
roots = []
|
||||
comment-token = "#"
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
|
||||
[[grammar]]
|
||||
name = "meson"
|
||||
source = { git = "https://github.com/bearcove/tree-sitter-meson", rev = "feea83be9225842490066522ced2d13eb9cce0bd" }
|
||||
|
62
runtime/queries/meson/highlights.scm
Normal file
62
runtime/queries/meson/highlights.scm
Normal file
@ -0,0 +1,62 @@
|
||||
(string_literal) @string
|
||||
|
||||
(boolean_literal) @constant.builtin.boolean
|
||||
(integer_literal) @constant.numeric.integer
|
||||
|
||||
(comment) @comment.line
|
||||
(function_id) @function
|
||||
(keyword_arg_key) @variable.other.member
|
||||
(id_expression) @variable
|
||||
|
||||
[
|
||||
"if"
|
||||
"elif"
|
||||
"else"
|
||||
"endif"
|
||||
] @keyword.control.conditional
|
||||
|
||||
[
|
||||
"foreach"
|
||||
"endforeach"
|
||||
] @keyword.control.repeat
|
||||
|
||||
[
|
||||
"break"
|
||||
"continue"
|
||||
] @keyword.control
|
||||
|
||||
[
|
||||
"not"
|
||||
"in"
|
||||
"and"
|
||||
"or"
|
||||
] @keyword.operator
|
||||
|
||||
[
|
||||
"!"
|
||||
"+"
|
||||
"-"
|
||||
"*"
|
||||
"/"
|
||||
"%"
|
||||
"=="
|
||||
"!="
|
||||
">"
|
||||
"<"
|
||||
">="
|
||||
"<="
|
||||
] @operator
|
||||
|
||||
[
|
||||
":"
|
||||
","
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
16
runtime/queries/meson/indents.scm
Normal file
16
runtime/queries/meson/indents.scm
Normal file
@ -0,0 +1,16 @@
|
||||
[
|
||||
(method_expression)
|
||||
(function_expression)
|
||||
(array_literal)
|
||||
(dictionary_literal)
|
||||
(selection_statement)
|
||||
(iteration_statement)
|
||||
] @indent
|
||||
|
||||
[
|
||||
")"
|
||||
"]"
|
||||
"}"
|
||||
"endif"
|
||||
"endforeach"
|
||||
] @outdent
|
Loading…
Reference in New Issue
Block a user