feat!: drop modules, general refactor and cleanup

This commit is contained in:
Christian Clason 2023-06-12 09:54:30 -06:00
parent c13e28f894
commit 2c8f2f2fad
829 changed files with 4905 additions and 8010 deletions

View file

@ -0,0 +1,9 @@
[
(style_element)
(script_element)
(element)
(if_statement)
(else_statement)
(each_statement)
(await_statement)
] @fold

View file

@ -0,0 +1,30 @@
; inherits: html_tags
(raw_text_expr) @none
[
(special_block_keyword)
(then)
(as)
] @keyword
((special_block_keyword) @keyword.coroutine
(#eq? @keyword.coroutine "await"))
((special_block_keyword) @exception
(#eq? @exception "catch"))
((special_block_keyword) @conditional
(#any-of? @conditional "if" "else"))
[
"{"
"}"
] @punctuation.bracket
[
"#"
":"
"/"
"@"
] @tag.delimiter

View file

@ -0,0 +1,20 @@
[
(element)
(if_statement)
(each_statement)
(await_statement)
(script_element)
(style_element)
] @indent.begin
[
(end_tag)
(else_statement)
(if_end_expr)
(each_end_expr)
(await_end_expr)
">"
"/>"
] @indent.branch
(comment) @indent.ignore

View file

@ -0,0 +1,41 @@
; inherits: html_tags
((style_element
(start_tag
(attribute
(attribute_name) @_attr
(quoted_attribute_value (attribute_value) @_lang)))
(raw_text) @injection.content)
(#eq? @_attr "lang")
(#any-of? @_lang "scss" "postcss" "less")
(#set! injection.language "scss")
(#set! injection.include-children))
([
(raw_text_expr)
(raw_text_each)
] @injection.content
(#set! injection.language "javascript")
(#set! injection.include-children))
((script_element
(start_tag
(attribute
(attribute_name) @_attr
(quoted_attribute_value (attribute_value) @_lang)))
(raw_text) @injection.content)
(#eq? @_attr "lang")
(#any-of? @_lang "ts" "typescript")
(#set! injection.language "typescript")
(#set! injection.include-children))
((element
(start_tag
(attribute
(attribute_name) @_attr
(quoted_attribute_value
(attribute_value) @injection.language)))
(text) @injection.content)
(#eq? @_attr "lang")
(#eq? @injection.language "pug")
(#set! injection.include-children))