mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
Improvements to Meson syntax. (#4572)
Co-authored-by: Garrett D'Amore <garrett.damore@weka.io> Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
This commit is contained in:
parent
70ebbd018a
commit
f843967059
@ -1510,7 +1510,7 @@ indent = { tab-width = 2, unit = " " }
|
||||
|
||||
[[grammar]]
|
||||
name = "meson"
|
||||
source = { git = "https://github.com/bearcove/tree-sitter-meson", rev = "feea83be9225842490066522ced2d13eb9cce0bd" }
|
||||
source = { git = "https://github.com/staysail/tree-sitter-meson", rev = "32a83e8f200c347232fa795636cfe60dde22957a" }
|
||||
|
||||
[[language]]
|
||||
name = "sshclientconfig"
|
||||
|
@ -1,62 +1,62 @@
|
||||
(string_literal) @string
|
||||
(comment) @comment
|
||||
|
||||
(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
|
||||
; these are listed first, because they override keyword queries
|
||||
(function_expression (identifier) @function)
|
||||
|
||||
[
|
||||
"if"
|
||||
"elif"
|
||||
"else"
|
||||
"endif"
|
||||
] @keyword.control.conditional
|
||||
|
||||
[
|
||||
"foreach"
|
||||
"endforeach"
|
||||
] @keyword.control.repeat
|
||||
|
||||
[
|
||||
"break"
|
||||
"continue"
|
||||
] @keyword.control
|
||||
|
||||
[
|
||||
"not"
|
||||
"in"
|
||||
"and"
|
||||
"or"
|
||||
] @keyword.operator
|
||||
|
||||
[
|
||||
"!"
|
||||
"+"
|
||||
"-"
|
||||
"*"
|
||||
"/"
|
||||
"%"
|
||||
"=="
|
||||
"!="
|
||||
">"
|
||||
"<"
|
||||
">="
|
||||
"<="
|
||||
(assignment_operator)
|
||||
(additive_operator)
|
||||
(multiplicative_operator)
|
||||
(equality_operator)
|
||||
">="
|
||||
"<="
|
||||
"<"
|
||||
">"
|
||||
"+"
|
||||
"-"
|
||||
] @operator
|
||||
|
||||
[
|
||||
":"
|
||||
","
|
||||
(and)
|
||||
(or)
|
||||
(not)
|
||||
(in)
|
||||
] @keyword.operator
|
||||
|
||||
[
|
||||
"(" ")" "[" "]" "{" "}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
(if)
|
||||
(elif)
|
||||
(else)
|
||||
(endif)
|
||||
] @keyword.control.conditional
|
||||
|
||||
[
|
||||
(foreach)
|
||||
(endforeach)
|
||||
(break)
|
||||
(continue)
|
||||
] @keyword.control.repeat
|
||||
|
||||
(boolean_literal) @constant.builtin.boolean
|
||||
(int_literal) @constant.numeric.integer
|
||||
|
||||
(keyword_argument keyword: (identifier) @variable.parameter)
|
||||
(escape_sequence) @constant.character.escape
|
||||
(bad_escape) @warning
|
||||
|
||||
[
|
||||
"."
|
||||
","
|
||||
":"
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
(string_literal)
|
||||
(fstring_literal)
|
||||
] @string
|
||||
|
||||
(identifier) @variable
|
||||
|
@ -1,5 +1,5 @@
|
||||
; Indentation queries for helix
|
||||
[
|
||||
(method_expression)
|
||||
(function_expression)
|
||||
(array_literal)
|
||||
(dictionary_literal)
|
||||
@ -7,10 +7,11 @@
|
||||
(iteration_statement)
|
||||
] @indent
|
||||
|
||||
; question - what about else, elif
|
||||
[
|
||||
")"
|
||||
"]"
|
||||
"}"
|
||||
"endif"
|
||||
"endforeach"
|
||||
(endif)
|
||||
(endforeach)
|
||||
] @outdent
|
||||
|
Loading…
Reference in New Issue
Block a user