diff --git a/queries/injections.scm b/queries/injections.scm index f52cf44..600a2a9 100644 --- a/queries/injections.scm +++ b/queries/injections.scm @@ -22,3 +22,28 @@ ; ((expression (expression_value) @injection.content) (#set! injection.language "elixir")) + +; Sintax highlight for style and javascript tags +((tag + (start_tag + (tag_name) @tag_name (#eq? @tag_name "script")) + (text) + (end_tag) +) @injection.content + (#offset! @injection.content 1 0 0 -9) + (#set! injection.language "javascript") + (#set! injection.include-children) + (#set! injection.combined) +) + +((tag + (start_tag + (tag_name) @tag_name (#eq? @tag_name "style")) + (text) + (end_tag) +) @injection.content + (#offset! @injection.content 1 0 0 -9) + (#set! injection.language "css") + (#set! injection.include-children) + (#set! injection.combined) +)