mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 21:40:03 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
c13e28f894
commit
2c8f2f2fad
829 changed files with 4905 additions and 8010 deletions
9
runtime/queries/svelte/folds.scm
Normal file
9
runtime/queries/svelte/folds.scm
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[
|
||||
(style_element)
|
||||
(script_element)
|
||||
(element)
|
||||
(if_statement)
|
||||
(else_statement)
|
||||
(each_statement)
|
||||
(await_statement)
|
||||
] @fold
|
||||
30
runtime/queries/svelte/highlights.scm
Normal file
30
runtime/queries/svelte/highlights.scm
Normal 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
|
||||
20
runtime/queries/svelte/indents.scm
Normal file
20
runtime/queries/svelte/indents.scm
Normal 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
|
||||
41
runtime/queries/svelte/injections.scm
Normal file
41
runtime/queries/svelte/injections.scm
Normal 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))
|
||||
Loading…
Add table
Add a link
Reference in a new issue