mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 09:56:19 +04:00
452f7d071c
This highlights edoc within Erlang comments. The trick was to have the Erlang grammar consume newlines and then give them to EDoc in the injection to use so that line-wise elements could be parsed accurately.
53 lines
1.2 KiB
Scheme
53 lines
1.2 KiB
Scheme
((section
|
|
(section_marker) @markup.heading.marker
|
|
(section_content) @markup.heading.1
|
|
(section_marker) @markup.heading.marker)
|
|
(#eq? @markup.heading.marker "=="))
|
|
|
|
((section
|
|
(section_marker) @markup.heading.marker
|
|
(section_content) @markup.heading.2
|
|
(section_marker) @markup.heading.marker)
|
|
(#eq? @markup.heading.marker "==="))
|
|
|
|
((section
|
|
(section_marker) @markup.heading.marker
|
|
(section_content) @markup.heading.3
|
|
(section_marker) @markup.heading.marker)
|
|
(#eq? @markup.heading.marker "===="))
|
|
|
|
(macro (tag) @function.macro)
|
|
(tag) @keyword
|
|
(macro_escape) @constant.character.escape
|
|
(inline_quote) @markup.raw.inline
|
|
(email_address) @markup.link.url
|
|
|
|
(em_xhtml_tag
|
|
(open_xhtml_tag) @tag
|
|
(xhtml_tag_content) @markup.italic
|
|
(close_xhtml_tag) @tag)
|
|
|
|
(strong_xhtml_tag
|
|
(open_xhtml_tag) @tag
|
|
(xhtml_tag_content) @markup.bold
|
|
(close_xhtml_tag) @tag)
|
|
|
|
(module) @namespace
|
|
(function) @function
|
|
(type) @type
|
|
|
|
; could be @constant.numeric.integer but this looks similar to a capture
|
|
(arity) @operator
|
|
|
|
(expression [":" "/"] @operator)
|
|
(expression ["(" ")"] @punctuation.delimiter)
|
|
(macro ["{" "}"] @function.macro)
|
|
|
|
[
|
|
(quote_marker)
|
|
(language_identifier)
|
|
(quote_content)
|
|
] @markup.raw.block
|
|
|
|
(parameter) @variable.parameter
|