2022-09-05 17:49:41 +04:00
|
|
|
; Elixir Code Comments
|
2021-12-19 18:56:56 +04:00
|
|
|
((comment) @injection.content
|
|
|
|
(#set! injection.language "comment"))
|
2022-01-06 19:00:00 +04:00
|
|
|
|
2022-09-05 17:49:41 +04:00
|
|
|
; Elixir Regular Expressions
|
2022-01-06 19:00:00 +04:00
|
|
|
((sigil
|
|
|
|
(sigil_name) @_sigil_name
|
|
|
|
(quoted_content) @injection.content)
|
2022-09-05 17:49:41 +04:00
|
|
|
(#match? @_sigil_name "^(R|r)$")
|
2022-01-06 19:00:00 +04:00
|
|
|
(#set! injection.language "regex")
|
|
|
|
(#set! injection.combined))
|
2022-04-13 05:57:07 +04:00
|
|
|
|
2022-09-05 17:49:41 +04:00
|
|
|
; Elixir Markdown Documentation
|
2022-05-31 06:32:14 +04:00
|
|
|
(unary_operator
|
|
|
|
operator: "@"
|
|
|
|
operand: (call
|
|
|
|
target: ((identifier) @_identifier (#match? @_identifier "^(module|type|short)?doc$"))
|
|
|
|
(arguments [
|
|
|
|
(string (quoted_content) @injection.content)
|
|
|
|
(sigil (quoted_content) @injection.content)
|
|
|
|
])) (#set! injection.language "markdown"))
|
2022-09-05 17:49:41 +04:00
|
|
|
|
|
|
|
; Zigler Sigils
|
|
|
|
((sigil
|
|
|
|
(sigil_name) @_sigil_name
|
|
|
|
(quoted_content) @injection.content)
|
|
|
|
(#match? @_sigil_name "^(Z|z)$")
|
|
|
|
(#set! injection.language "zig")
|
|
|
|
(#set! injection.combined))
|
|
|
|
|
|
|
|
; Jason Sigils
|
|
|
|
((sigil
|
|
|
|
(sigil_name) @_sigil_name
|
|
|
|
(quoted_content) @injection.content)
|
|
|
|
(#match? @_sigil_name "^(J|j)$")
|
|
|
|
(#set! injection.language "json")
|
|
|
|
(#set! injection.combined))
|
|
|
|
|
|
|
|
; Phoenix Live View HEEx Sigils
|
|
|
|
((sigil
|
|
|
|
(sigil_name) @_sigil_name
|
|
|
|
(quoted_content) @injection.content)
|
|
|
|
(#eq? @_sigil_name "H")
|
|
|
|
(#set! injection.language "heex")
|
|
|
|
(#set! injection.combined))
|
|
|
|
|
|
|
|
; Phoenix Live View Component Macros
|
|
|
|
(call
|
|
|
|
(identifier) @_identifier
|
|
|
|
(arguments
|
|
|
|
(atom)+
|
|
|
|
(keywords (pair
|
|
|
|
((keyword) @_keyword (#eq? @_keyword "doc: "))
|
|
|
|
[
|
|
|
|
(string (quoted_content) @injection.content)
|
|
|
|
(sigil (quoted_content) @injection.content)
|
|
|
|
]))
|
|
|
|
(#match? @_identifier "^(attr|slot)$")
|
|
|
|
(#set! injection.language "markdown")))
|