mirror of
https://github.com/helix-editor/helix
synced 2026-03-27 15:31:58 +01:00
[styx](https://styx.bearcove.eu/) is a document language. tree-sitter queries are based on the ones provided by the language project itself and then modified and extended to work with Helix.
43 lines
901 B
Scheme
43 lines
901 B
Scheme
(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
|