aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/meson/highlights.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/meson/highlights.scm')
-rw-r--r--runtime/queries/meson/highlights.scm77
1 files changed, 77 insertions, 0 deletions
diff --git a/runtime/queries/meson/highlights.scm b/runtime/queries/meson/highlights.scm
new file mode 100644
index 000000000..b00c3399b
--- /dev/null
+++ b/runtime/queries/meson/highlights.scm
@@ -0,0 +1,77 @@
+(comment) @comment @spell
+
+(number) @number
+
+(bool) @boolean
+
+(identifier) @variable
+
+[
+ "("
+ ")"
+ "{"
+ "}"
+ "["
+ "]"
+] @punctuation.bracket
+
+[
+ ":"
+ ","
+ "."
+] @punctuation.delimiter
+
+[
+ "and"
+ "not"
+ "or"
+ "in"
+] @keyword.operator
+
+[
+ "="
+ "=="
+ "!="
+ "+"
+ "/"
+ "/="
+ "+="
+ "-="
+ ">"
+ ">="
+] @operator
+
+(ternaryoperator
+ [
+ "?"
+ ":"
+ ] @keyword.conditional.ternary)
+
+[
+ "if"
+ "elif"
+ "else"
+ "endif"
+] @keyword.conditional
+
+[
+ "foreach"
+ "endforeach"
+ (keyword_break)
+ (keyword_continue)
+] @keyword.repeat
+
+(string) @string
+
+"@" @punctuation.special
+
+(normal_command
+ command: (identifier) @function)
+
+(pair
+ key: (identifier) @property)
+
+(escape_sequence) @string.escape
+
+((identifier) @variable.builtin
+ (#any-of? @variable.builtin "meson" "host_machine" "build_machine" "target_machine"))