diff --git a/runtime/queries/elixir/injections.scm b/runtime/queries/elixir/injections.scm index d49e1b4ad69ba..4853b84b64d8e 100644 --- a/runtime/queries/elixir/injections.scm +++ b/runtime/queries/elixir/injections.scm @@ -1,4 +1,4 @@ -; Elixir Comments +; Elixir Code Comments ((comment) @injection.content (#set! injection.language "comment")) @@ -6,11 +6,11 @@ ((sigil (sigil_name) @_sigil_name (quoted_content) @injection.content) - (#match? @_sigil_name "^(r|R)$") + (#match? @_sigil_name "^(R|r)$") (#set! injection.language "regex") (#set! injection.combined)) -; Elixir Documentation +; Elixir Markdown Documentation (unary_operator operator: "@" operand: (call @@ -20,6 +20,22 @@ (sigil (quoted_content) @injection.content) ])) (#set! injection.language "markdown")) +; 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 @@ -34,7 +50,7 @@ (arguments (atom)+ (keywords (pair - (keyword) + ((keyword) @_keyword (#eq? @_keyword "doc: ")) [ (string (quoted_content) @injection.content) (sigil (quoted_content) @injection.content)