feat(treesitter): replace nvim-treesitter with pack-managed parsers

This commit is contained in:
2026-04-12 11:46:54 +02:00
parent ec81afbab7
commit cf898d1fee
107 changed files with 8555 additions and 13 deletions
+15
View File
@@ -0,0 +1,15 @@
; SPDX-License-Identifier: Apache-2.0
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
; inherits: html
[
(if_statement)
(else_if_block)
(else_block)
(each_statement)
(await_statement)
(then_block)
(catch_block)
(key_statement)
(snippet_statement)
] @fold
+45
View File
@@ -0,0 +1,45 @@
; SPDX-License-Identifier: Apache-2.0
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
; 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
+36
View File
@@ -0,0 +1,36 @@
; SPDX-License-Identifier: Apache-2.0
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
; 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
+49
View File
@@ -0,0 +1,49 @@
; SPDX-License-Identifier: Apache-2.0
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
; 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"))
+3
View File
@@ -0,0 +1,3 @@
; SPDX-License-Identifier: Apache-2.0
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
; inherits: html