mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
13
runtime/queries/svelte/folds.scm
Normal file
13
runtime/queries/svelte/folds.scm
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
; inherits: html
|
||||
|
||||
[
|
||||
(if_statement)
|
||||
(else_if_block)
|
||||
(else_block)
|
||||
(each_statement)
|
||||
(await_statement)
|
||||
(then_block)
|
||||
(catch_block)
|
||||
(key_statement)
|
||||
(snippet_statement)
|
||||
] @fold
|
||||
43
runtime/queries/svelte/highlights.scm
Normal file
43
runtime/queries/svelte/highlights.scm
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
; inherits: html
|
||||
|
||||
(raw_text) @none
|
||||
|
||||
[
|
||||
"as"
|
||||
"key"
|
||||
"html"
|
||||
"snippet"
|
||||
"render"
|
||||
] @keyword
|
||||
|
||||
"const" @keyword.modifier
|
||||
|
||||
[
|
||||
"if"
|
||||
"else if"
|
||||
"else"
|
||||
"then"
|
||||
] @keyword.conditional
|
||||
|
||||
"each" @keyword.repeat
|
||||
|
||||
[
|
||||
"await"
|
||||
"then"
|
||||
] @keyword.coroutine
|
||||
|
||||
"catch" @keyword.exception
|
||||
|
||||
"debug" @keyword.debug
|
||||
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"#"
|
||||
":"
|
||||
"/"
|
||||
"@"
|
||||
] @tag.delimiter
|
||||
34
runtime/queries/svelte/indents.scm
Normal file
34
runtime/queries/svelte/indents.scm
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
; inherits: html
|
||||
|
||||
[
|
||||
(if_statement)
|
||||
(each_statement)
|
||||
(await_statement)
|
||||
(key_statement)
|
||||
(snippet_statement)
|
||||
] @indent.begin
|
||||
|
||||
(if_end
|
||||
"}" @indent.end)
|
||||
|
||||
(each_end
|
||||
"}" @indent.end)
|
||||
|
||||
(await_end
|
||||
"}" @indent.end)
|
||||
|
||||
(key_end
|
||||
"}" @indent.end)
|
||||
|
||||
(snippet_end
|
||||
"}" @indent.end)
|
||||
|
||||
[
|
||||
(if_end)
|
||||
(else_if_block)
|
||||
(else_block)
|
||||
(each_end)
|
||||
(await_end)
|
||||
(key_end)
|
||||
(snippet_end)
|
||||
] @indent.branch
|
||||
47
runtime/queries/svelte/injections.scm
Normal file
47
runtime/queries/svelte/injections.scm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
; 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"))
|
||||
|
||||
((svelte_raw_text) @injection.content
|
||||
(#set! injection.language "javascript"))
|
||||
|
||||
((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"))
|
||||
|
||||
((script_element
|
||||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @_attr
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @_lang)))
|
||||
(raw_text) @injection.content)
|
||||
(#eq? @_attr "lang")
|
||||
(#any-of? @_lang "js" "javascript")
|
||||
(#set! injection.language "javascript"))
|
||||
|
||||
((element
|
||||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @_attr
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @injection.language)))
|
||||
(text) @injection.content)
|
||||
(#eq? @_attr "lang")
|
||||
(#eq? @injection.language "pug"))
|
||||
1
runtime/queries/svelte/locals.scm
Normal file
1
runtime/queries/svelte/locals.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
; inherits: html
|
||||
Loading…
Add table
Add a link
Reference in a new issue