Files
helix/runtime/queries/metamath/highlights.scm
Michael Davisandm4dh0rs3 e14e8477e8 Add language support for Metamath
locals.scm used bare @local.definition instead of the required
@local.definition.<class> suffix, so its captures had no effect.
highlights.scm used @function.definition and @function.call, which
aren't real highlight scopes (they fall back to plain @function
anyway). Fixed both to follow convention, splitting locals.scm
definitions into variable (floating/essential hypotheses) and
function (axiom/provable theorems) to match the classification
already used in tags.scm.

Co-authored-by: m4dh0rs3 <54140937+m4dh0rs3@users.noreply.github.com>
2026-07-04 16:26:06 -04:00

46 lines
1004 B
Scheme

; Keywords and delimiters
[ "$c" "$v" "$d" "$f" "$e" "$a" "$p" "$=" ] @keyword
[ "${" "$}" ] @punctuation.bracket
[ "$[" "$]" ] @keyword.import
"$." @punctuation.delimiter
; Markup (update grammar.js to support)
; "####" @markup.heading.1
; "#*#*" @markup.heading.2
; "=-=-" @markup.heading.3
; "-.-." @markup.heading.4
; Builtin typecodes
[ "|-" "wff" "setvar" "class" ] @type.builtin
; Labels
(floating_stmt (label) @function)
(essential_stmt (label) @function)
(axiom_stmt (label) @function)
(provable_stmt (label) @function)
; Types
(typecode) @type
; Variables and constants in declarations
(constant_stmt (constant) @constant)
(variable_stmt (variable) @variable)
; Math symbols
(mathsymbol) @variable
; Proofs
(uncompressed_proof (label) @function)
(compressed_proof (label) @function)
(compressed_proof_block) @string
; Comments
(comment) @comment.block
; Parentheses in math expressions
"(" @punctuation.bracket
")" @punctuation.bracket
; File includes
(filename) @string.special.path