mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[
|
||||
(conditionalSect)
|
||||
(Comment)
|
||||
(conditionalSect)
|
||||
(Comment)
|
||||
] @fold
|
||||
|
|
|
|||
|
|
@ -1,80 +1,95 @@
|
|||
;; XML declaration
|
||||
; XML declaration
|
||||
(XMLDecl
|
||||
"xml" @keyword.directive)
|
||||
|
||||
(XMLDecl "xml" @keyword.directive)
|
||||
(XMLDecl
|
||||
[
|
||||
"version"
|
||||
"encoding"
|
||||
] @tag.attribute)
|
||||
|
||||
(XMLDecl [ "version" "encoding" ] @tag.attribute)
|
||||
(XMLDecl
|
||||
(EncName) @string.special)
|
||||
|
||||
(XMLDecl (EncName) @string.special)
|
||||
|
||||
(XMLDecl (VersionNum) @number)
|
||||
|
||||
;; Processing instructions
|
||||
(XMLDecl
|
||||
(VersionNum) @number)
|
||||
|
||||
; Processing instructions
|
||||
(PI) @keyword.directive
|
||||
|
||||
;; Element declaration
|
||||
|
||||
; Element declaration
|
||||
(elementdecl
|
||||
"ELEMENT" @keyword.directive.define
|
||||
(Name) @tag)
|
||||
|
||||
(contentspec
|
||||
(_ (Name) @tag.attribute))
|
||||
(_
|
||||
(Name) @tag.attribute))
|
||||
|
||||
"#PCDATA" @type.builtin
|
||||
|
||||
[ "EMPTY" "ANY" ] @type.qualifier
|
||||
[
|
||||
"EMPTY"
|
||||
"ANY"
|
||||
] @type.qualifier
|
||||
|
||||
[ "*" "?" "+" ] @character.special
|
||||
|
||||
;; Entity declaration
|
||||
[
|
||||
"*"
|
||||
"?"
|
||||
"+"
|
||||
] @character.special
|
||||
|
||||
; Entity declaration
|
||||
(GEDecl
|
||||
"ENTITY" @keyword.directive.define
|
||||
(Name) @constant)
|
||||
|
||||
(GEDecl (EntityValue) @string)
|
||||
(GEDecl
|
||||
(EntityValue) @string)
|
||||
|
||||
(NDataDecl
|
||||
"NDATA" @keyword
|
||||
(Name) @label)
|
||||
|
||||
;; Parsed entity declaration
|
||||
|
||||
; Parsed entity declaration
|
||||
(PEDecl
|
||||
"ENTITY" @keyword.directive.define
|
||||
"%" @operator
|
||||
(Name) @function.macro)
|
||||
|
||||
(PEDecl (EntityValue) @string)
|
||||
|
||||
;; Notation declaration
|
||||
(PEDecl
|
||||
(EntityValue) @string)
|
||||
|
||||
; Notation declaration
|
||||
(NotationDecl
|
||||
"NOTATION" @keyword.directive
|
||||
(Name) @label)
|
||||
|
||||
((NotationDecl
|
||||
(ExternalID
|
||||
(SystemLiteral (URI) @string.special.url))
|
||||
(#set! "priority" 105)))
|
||||
|
||||
;; Attlist declaration
|
||||
(SystemLiteral
|
||||
(URI) @string.special.url))
|
||||
(#set! "priority" 105)))
|
||||
|
||||
; Attlist declaration
|
||||
(AttlistDecl
|
||||
"ATTLIST" @keyword.directive.define
|
||||
(Name) @tag)
|
||||
|
||||
(AttDef (Name) @tag.attribute)
|
||||
(AttDef
|
||||
(Name) @tag.attribute)
|
||||
|
||||
(AttDef (Enumeration (Nmtoken) @string))
|
||||
(AttDef
|
||||
(Enumeration
|
||||
(Nmtoken) @string))
|
||||
|
||||
[
|
||||
(StringType)
|
||||
(TokenizedType)
|
||||
] @type.builtin
|
||||
|
||||
(NotationType "NOTATION" @type.builtin)
|
||||
(NotationType
|
||||
"NOTATION" @type.builtin)
|
||||
|
||||
[
|
||||
"#REQUIRED"
|
||||
|
|
@ -82,38 +97,57 @@
|
|||
"#FIXED"
|
||||
] @attribute
|
||||
|
||||
;; Entities
|
||||
|
||||
; Entities
|
||||
(EntityRef) @constant
|
||||
|
||||
((EntityRef) @constant.builtin
|
||||
(#any-of? @constant.builtin
|
||||
"&" "<" ">" """ "'"))
|
||||
(#any-of? @constant.builtin "&" "<" ">" """ "'"))
|
||||
|
||||
(CharRef) @character
|
||||
|
||||
(PEReference) @function.macro
|
||||
|
||||
;; External references
|
||||
|
||||
[ "PUBLIC" "SYSTEM" ] @keyword
|
||||
; External references
|
||||
[
|
||||
"PUBLIC"
|
||||
"SYSTEM"
|
||||
] @keyword
|
||||
|
||||
(PubidLiteral) @string.special
|
||||
|
||||
(SystemLiteral (URI) @string.special.url)
|
||||
(SystemLiteral
|
||||
(URI) @string.special.url)
|
||||
|
||||
;; Delimiters & punctuation
|
||||
; Delimiters & punctuation
|
||||
[
|
||||
"<?"
|
||||
"?>"
|
||||
"<!"
|
||||
">"
|
||||
"]]>"
|
||||
] @tag.delimiter
|
||||
|
||||
[ "<?" "?>" "<!" ">" "]]>" ] @tag.delimiter
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
] @punctuation.bracket
|
||||
|
||||
[ "(" ")" "[" ] @punctuation.bracket
|
||||
[
|
||||
"\""
|
||||
"'"
|
||||
] @punctuation.delimiter
|
||||
|
||||
[ "\"" "'" ] @punctuation.delimiter
|
||||
[
|
||||
","
|
||||
"|"
|
||||
"="
|
||||
] @operator
|
||||
|
||||
[ "," "|" "=" ] @operator
|
||||
|
||||
;; Misc
|
||||
|
||||
[ "INCLUDE" "IGNORE" ] @keyword.import
|
||||
; Misc
|
||||
[
|
||||
"INCLUDE"
|
||||
"IGNORE"
|
||||
] @keyword.import
|
||||
|
||||
(Comment) @comment @spell
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
(elementdecl (Name) @local.definition.type)
|
||||
(elementdecl
|
||||
(Name) @local.definition.type)
|
||||
|
||||
(elementdecl
|
||||
(contentspec
|
||||
(children (Name) @local.reference)))
|
||||
(children
|
||||
(Name) @local.reference)))
|
||||
|
||||
(AttlistDecl . (Name) @local.reference)
|
||||
(AttlistDecl
|
||||
.
|
||||
(Name) @local.reference)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue