Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/styx/highlights.scm')
-rw-r--r--runtime/queries/styx/highlights.scm42
1 files changed, 42 insertions, 0 deletions
diff --git a/runtime/queries/styx/highlights.scm b/runtime/queries/styx/highlights.scm
new file mode 100644
index 00000000..eff20bd1
--- /dev/null
+++ b/runtime/queries/styx/highlights.scm
@@ -0,0 +1,42 @@
+(line_comment) @comment.line
+(doc_comment) @comment.line.documentation
+
+(escape_sequence) @constant.character.escape
+
+(bare_scalar) @string
+(quoted_scalar) @string
+(raw_scalar) @string
+(heredoc) @string
+
+; Heredoc language hint (metadata)
+(heredoc_lang) @label
+
+(unit) @constant.builtin
+
+; Tags - styled same as unit since @ is the tag sigil
+(tag) @constant.builtin
+
+; Attributes - key in attribute syntax
+; Use @keyword or @punctuation.special to make > stand out
+(attribute
+ key: (bare_scalar) @variable.other.member
+ ">" @keyword)
+
+; Keys in entries - any scalar in the key position (overrides @string above)
+(entry
+ key: (expr
+ payload: (scalar (_) @variable.other.member)))
+
+; Sequence items are values, not keys (must come AFTER entry key rule to override)
+(sequence
+ (expr
+ payload: (scalar (_) @string)))
+
+[
+ "{"
+ "}"
+ "("
+ ")"
+] @punctuation.bracket
+
+"," @punctuation.delimiter