mirror of https://github.com/helix-editor/helix
add support for tree-sitter custom template languages on vue (#13511)
Co-authored-by: TheSylex <TheSylex@users.noreply.github.com>pull/12884/merge
parent
63a1a94d92
commit
908b9edf28
|
@ -40,5 +40,21 @@
|
|||
(raw_text) @injection.content)
|
||||
(#eq? @_attr_name "lang"))
|
||||
|
||||
; <template>
|
||||
((template_element
|
||||
(start_tag) @_no_lang
|
||||
(text) @injection.content)
|
||||
(#not-match? @_no_lang "lang=")
|
||||
(#set! injection.language "html"))
|
||||
|
||||
; <template lang="...">
|
||||
((template_element
|
||||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @_attr_name
|
||||
(quoted_attribute_value (attribute_value) @injection.language)))
|
||||
(text) @injection.content)
|
||||
(#eq? @_attr_name "lang"))
|
||||
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
|
Loading…
Reference in New Issue