From ddf2de739068b5ff0866ccb1d067f3cb53a4fc55 Mon Sep 17 00:00:00 2001 From: David Czihak Date: Thu, 7 May 2026 14:33:19 +0200 Subject: Initial commit --- Queries/highlights.scm | 123 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 Queries/highlights.scm (limited to 'Queries/highlights.scm') diff --git a/Queries/highlights.scm b/Queries/highlights.scm new file mode 100644 index 0000000..b366bc7 --- /dev/null +++ b/Queries/highlights.scm @@ -0,0 +1,123 @@ +(comment) @comment + +[ + (string) + (multiline_string) + (character) +] @string + +[ + (integer) + (float) +] @value.number + +[ + "true" + "false" +] @value.boolean + +[ + "null" + "undefined" + "unreachable" +] @value.null + +(builtin_type) @identifier.type +(builtin_identifier) @identifier.core + +((builtin_identifier) @processing + (#match? @processing "^@(import|cImport)$")) + +((identifier) @identifier.core + (#eq? @identifier.core "_")) + +(parameter + name: (identifier) @identifier.argument) + +(payload + (identifier) @identifier.argument) + +(field_expression + member: (identifier) @identifier.property) + +(field_initializer + (identifier) @identifier.property) + +(function_declaration + name: (identifier) @identifier.function) + +(call_expression + function: (identifier) @identifier.function) + +(call_expression + function: (field_expression + member: (identifier) @identifier.function)) + +((identifier) @identifier.type + (#match? @identifier.type "^[A-Z][A-Za-z0-9_]*$")) + +((identifier) @identifier.constant + (#match? @identifier.constant "^[A-Z][A-Z0-9_]+$")) + +[ + "asm" + "const" + "defer" + "errdefer" + "error" + "return" + "test" + "var" +] @keyword + +[ + "struct" + "union" + "enum" + "opaque" + "fn" +] @keyword.construct + +[ + "if" + "else" + "switch" + "for" + "while" + "try" + "catch" + "break" + "continue" +] @keyword.condition + +[ + "usingnamespace" + "export" + "comptime" + "inline" + "noinline" + "extern" + "pub" + "packed" + "threadlocal" + "volatile" + "allowzero" + "noalias" + "addrspace" + "align" + "callconv" + "linksection" + "async" + "await" + "suspend" + "nosuspend" + "resume" +] @keyword.modifier + +[ + "and" + "or" + "orelse" +] @keyword.operator + +(ERROR) @invalid -- cgit v1.3