helix-mods/runtime/queries/edoc/injections.scm
Michael Davis 452f7d071c Improve Edoc highlighting within Erlang
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.
2022-11-24 11:07:05 +09:00

21 lines
498 B
Scheme

((xhtml_tag) @injection.content
(#set! injection.combined)
(#set! injection.include-children)
(#set! injection.language "html"))
((block_quote
!language
(quote_content) @injection.content)
(#set! injection.language "erlang"))
(block_quote
language: (language_identifier) @injection.language
(quote_content) @injection.content)
((macro
(tag) @_tag
(argument) @injection.content)
(#eq? @_tag "@type")
(#set! injection.language "erlang")
(#set! injection.include-children))