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
+8
View File
@@ -0,0 +1,8 @@
; SPDX-License-Identifier: Apache-2.0
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
[
(element)
(doctypedecl)
(Comment)
] @fold
+201
View File
@@ -0,0 +1,201 @@
; SPDX-License-Identifier: Apache-2.0
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
; XML declaration
(XMLDecl
"xml" @keyword.directive)
(XMLDecl
[
"version"
"encoding"
"standalone"
] @tag.attribute)
(XMLDecl
(EncName) @string.special)
(XMLDecl
(VersionNum) @number)
(XMLDecl
[
"yes"
"no"
] @boolean)
; Processing instructions
(PI) @keyword.directive
; Element declaration
(elementdecl
"ELEMENT" @keyword.directive.define
(Name) @tag)
(contentspec
(_
(Name) @tag.attribute))
"#PCDATA" @type.builtin
[
"EMPTY"
"ANY"
] @keyword.modifier
[
"*"
"?"
"+"
] @character.special
; Entity declaration
(GEDecl
"ENTITY" @keyword.directive.define
(Name) @constant)
(GEDecl
(EntityValue) @string)
(NDataDecl
"NDATA" @keyword
(Name) @label)
; Parsed entity declaration
(PEDecl
"ENTITY" @keyword.directive.define
"%" @operator
(Name) @function.macro)
(PEDecl
(EntityValue) @string)
; Notation declaration
(NotationDecl
"NOTATION" @keyword.directive
(Name) @label)
; Attlist declaration
(AttlistDecl
"ATTLIST" @keyword.directive.define
(Name) @tag)
(AttDef
(Name) @tag.attribute)
(AttDef
(Enumeration
(Nmtoken) @string))
[
(StringType)
(TokenizedType)
] @type.builtin
(NotationType
"NOTATION" @type.builtin)
[
"#REQUIRED"
"#IMPLIED"
"#FIXED"
] @attribute
; Entities
(EntityRef) @constant
((EntityRef) @constant.builtin
(#any-of? @constant.builtin "&" "<" ">" """ "'"))
(CharRef) @character
(PEReference) @function.macro
; External references
[
"PUBLIC"
"SYSTEM"
] @keyword
(PubidLiteral) @string.special
(SystemLiteral
(URI) @string.special.url)
; Processing instructions
(XmlModelPI
"xml-model" @keyword.directive)
(StyleSheetPI
"xml-stylesheet" @keyword.directive)
(PseudoAtt
(Name) @tag.attribute)
(PseudoAtt
(PseudoAttValue) @string)
; Doctype declaration
(doctypedecl
"DOCTYPE" @keyword.directive.define)
(doctypedecl
(Name) @type.definition)
; Tags
(STag
(Name) @tag)
(ETag
(Name) @tag)
(EmptyElemTag
(Name) @tag)
; Attributes
(Attribute
(Name) @tag.attribute)
(Attribute
(AttValue) @string)
; Delimiters & punctuation
[
"<?"
"?>"
"<"
">"
"</"
"/>"
"<!"
"]]>"
] @tag.delimiter
[
"("
")"
"["
"]"
] @punctuation.bracket
[
"\""
"'"
] @punctuation.delimiter
[
","
"|"
"="
] @operator
; Text
(CharData) @none @spell
(CDSect
(CDStart) @module
(CData) @markup.raw
"]]>" @module)
; Misc
(Comment) @comment @spell
+19
View File
@@ -0,0 +1,19 @@
; SPDX-License-Identifier: Apache-2.0
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
(element) @indent.begin
[
(Attribute)
(AttlistDecl)
(contentspec)
] @indent.align
(ETag) @indent.branch
(doctypedecl) @indent.ignore
[
(Comment)
(ERROR)
] @indent.auto
+35
View File
@@ -0,0 +1,35 @@
; SPDX-License-Identifier: Apache-2.0
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
((Comment) @injection.content
(#set! injection.language "comment"))
; SVG style
((element
(STag
(Name) @_name)
(content) @injection.content)
(#eq? @_name "style")
(#set! injection.combined)
(#set! injection.include-children)
(#set! injection.language "css"))
; SVG script
((element
(STag
(Name) @_name)
(content) @injection.content)
(#eq? @_name "script")
(#set! injection.combined)
(#set! injection.include-children)
(#set! injection.language "javascript"))
; phpMyAdmin dump
((element
(STag
(Name) @_name)
(content) @injection.content)
(#eq? @_name "pma:table")
(#set! injection.combined)
(#set! injection.include-children)
(#set! injection.language "sql"))
+38
View File
@@ -0,0 +1,38 @@
; SPDX-License-Identifier: Apache-2.0
; Source: nvim-treesitter (https://github.com/nvim-treesitter/nvim-treesitter)
; tags
(elementdecl
(Name) @local.definition.type)
(elementdecl
(contentspec
(children
(Name) @local.reference)))
(AttlistDecl
.
(Name) @local.reference)
(STag
(Name) @local.reference)
(ETag
(Name) @local.reference)
(EmptyElemTag
(Name) @local.reference)
; attributes
(AttDef
(Name) @local.definition.field)
(Attribute
(Name) @local.reference)
; entities
(GEDecl
(Name) @local.definition.macro)
(EntityRef
(Name) @local.reference)