2022-01-23 20:40:21 -08:00
|
|
|
; Comments
|
2024-01-06 15:05:50 +09:00
|
|
|
((comment) @injection.content
|
|
|
|
|
(#set! injection.language "comment"))
|
2022-01-23 20:40:21 -08:00
|
|
|
|
|
|
|
|
; Documentation
|
|
|
|
|
(unary_operator
|
|
|
|
|
operator: "@"
|
2024-03-21 20:44:35 +09:00
|
|
|
operand: (call
|
|
|
|
|
target: ((identifier) @_identifier
|
|
|
|
|
(#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc"))
|
|
|
|
|
(arguments
|
|
|
|
|
[
|
|
|
|
|
(string
|
|
|
|
|
(quoted_content) @injection.content)
|
|
|
|
|
(sigil
|
|
|
|
|
(quoted_content) @injection.content)
|
|
|
|
|
])
|
|
|
|
|
(#set! injection.language "markdown")))
|
2021-10-05 19:35:35 -07:00
|
|
|
|
2022-01-23 20:40:21 -08:00
|
|
|
; HEEx
|
2021-10-20 13:20:05 +02:00
|
|
|
(sigil
|
|
|
|
|
(sigil_name) @_sigil_name
|
2023-05-03 19:07:59 +09:00
|
|
|
(quoted_content) @injection.content
|
2024-01-06 15:05:50 +09:00
|
|
|
(#eq? @_sigil_name "H")
|
|
|
|
|
(#set! injection.language "heex"))
|
2021-10-05 19:35:35 -07:00
|
|
|
|
2022-01-23 20:40:21 -08:00
|
|
|
; Surface
|
|
|
|
|
(sigil
|
|
|
|
|
(sigil_name) @_sigil_name
|
2023-05-03 19:07:59 +09:00
|
|
|
(quoted_content) @injection.content
|
2024-01-06 15:05:50 +09:00
|
|
|
(#eq? @_sigil_name "F")
|
|
|
|
|
(#set! injection.language "surface"))
|
2022-01-23 20:40:21 -08:00
|
|
|
|
|
|
|
|
; Zigler
|
2022-01-25 08:52:51 -08:00
|
|
|
(sigil
|
|
|
|
|
(sigil_name) @_sigil_name
|
2023-05-03 19:07:59 +09:00
|
|
|
(quoted_content) @injection.content
|
2024-01-06 15:05:50 +09:00
|
|
|
(#any-of? @_sigil_name "E" "L")
|
|
|
|
|
(#set! injection.language "eex"))
|
2022-01-25 08:52:51 -08:00
|
|
|
|
2021-10-20 13:20:05 +02:00
|
|
|
(sigil
|
|
|
|
|
(sigil_name) @_sigil_name
|
2023-05-03 19:07:59 +09:00
|
|
|
(quoted_content) @injection.content
|
2024-01-06 15:05:50 +09:00
|
|
|
(#any-of? @_sigil_name "z" "Z")
|
|
|
|
|
(#set! injection.language "zig"))
|
2021-10-06 12:30:40 -07:00
|
|
|
|
2022-01-23 20:40:21 -08:00
|
|
|
; Regex
|
2021-10-20 13:20:05 +02:00
|
|
|
(sigil
|
|
|
|
|
(sigil_name) @_sigil_name
|
2023-05-03 19:07:59 +09:00
|
|
|
(quoted_content) @injection.content
|
2024-01-06 15:05:50 +09:00
|
|
|
(#any-of? @_sigil_name "r" "R")
|
|
|
|
|
(#set! injection.language "regex"))
|
2021-10-06 12:30:40 -07:00
|
|
|
|
2023-05-03 19:07:59 +09:00
|
|
|
; Json
|
2022-01-23 20:40:21 -08:00
|
|
|
(sigil
|
|
|
|
|
(sigil_name) @_sigil_name
|
2023-05-03 19:07:59 +09:00
|
|
|
(quoted_content) @injection.content
|
2024-01-06 15:05:50 +09:00
|
|
|
(#any-of? @_sigil_name "j" "J")
|
|
|
|
|
(#set! injection.language "json"))
|