feat(treesitter): replace nvim-treesitter with pack-managed parsers
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
; SPDX-License-Identifier: Apache-2.0
|
||||
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
|
||||
|
||||
[
|
||||
(element)
|
||||
(style_element)
|
||||
(script_element)
|
||||
] @fold
|
||||
@@ -0,0 +1,9 @@
|
||||
; SPDX-License-Identifier: Apache-2.0
|
||||
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
|
||||
; inherits: html_tags
|
||||
|
||||
(doctype) @constant
|
||||
|
||||
"<!" @tag.delimiter
|
||||
|
||||
(entity) @character.special
|
||||
@@ -0,0 +1,3 @@
|
||||
; SPDX-License-Identifier: Apache-2.0
|
||||
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
|
||||
; inherits: html_tags
|
||||
@@ -0,0 +1,29 @@
|
||||
; SPDX-License-Identifier: Apache-2.0
|
||||
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
|
||||
; inherits: html_tags
|
||||
|
||||
(element
|
||||
(start_tag
|
||||
(tag_name) @_py_script)
|
||||
(text) @injection.content
|
||||
(#any-of? @_py_script "py-script" "py-repl")
|
||||
(#set! injection.language "python"))
|
||||
|
||||
(script_element
|
||||
(start_tag
|
||||
(attribute
|
||||
(attribute_name) @_attr
|
||||
(quoted_attribute_value
|
||||
(attribute_value) @_type)))
|
||||
(raw_text) @injection.content
|
||||
(#eq? @_attr "type")
|
||||
; not adding type="py" here as it's handled by html_tags
|
||||
(#any-of? @_type "pyscript" "py-script")
|
||||
(#set! injection.language "python"))
|
||||
|
||||
(element
|
||||
(start_tag
|
||||
(tag_name) @_py_config)
|
||||
(text) @injection.content
|
||||
(#eq? @_py_config "py-config")
|
||||
(#set! injection.language "toml"))
|
||||
@@ -0,0 +1,4 @@
|
||||
; SPDX-License-Identifier: Apache-2.0
|
||||
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
|
||||
|
||||
(element) @local.scope
|
||||
Reference in New Issue
Block a user