mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 16:30:02 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,53 +1,65 @@
|
|||
; inherits: dtd
|
||||
; XML declaration
|
||||
(XMLDecl
|
||||
"standalone" @tag.attribute)
|
||||
|
||||
;; XML declaration
|
||||
(XMLDecl
|
||||
[
|
||||
"yes"
|
||||
"no"
|
||||
] @boolean)
|
||||
|
||||
(XMLDecl "standalone" @tag.attribute)
|
||||
; Processing instructions
|
||||
(XmlModelPI
|
||||
"xml-model" @keyword.directive)
|
||||
|
||||
(XMLDecl [ "yes" "no" ] @boolean)
|
||||
(StyleSheetPI
|
||||
"xml-stylesheet" @keyword.directive)
|
||||
|
||||
;; Processing instructions
|
||||
(PseudoAtt
|
||||
(Name) @tag.attribute)
|
||||
|
||||
(XmlModelPI "xml-model" @keyword.directive)
|
||||
(PseudoAtt
|
||||
(PseudoAttValue) @string)
|
||||
|
||||
(StyleSheetPI "xml-stylesheet" @keyword.directive)
|
||||
; Doctype declaration
|
||||
(doctypedecl
|
||||
"DOCTYPE" @keyword.directive.define)
|
||||
|
||||
(PseudoAtt (Name) @tag.attribute)
|
||||
(doctypedecl
|
||||
(Name) @type.definition)
|
||||
|
||||
(PseudoAtt (PseudoAttValue) @string)
|
||||
; Tags
|
||||
(STag
|
||||
(Name) @tag)
|
||||
|
||||
;; Doctype declaration
|
||||
(ETag
|
||||
(Name) @tag)
|
||||
|
||||
(doctypedecl "DOCTYPE" @keyword.directive.define)
|
||||
(EmptyElemTag
|
||||
(Name) @tag)
|
||||
|
||||
(doctypedecl (Name) @type.definition)
|
||||
; Attributes
|
||||
(Attribute
|
||||
(Name) @tag.attribute)
|
||||
|
||||
;; Tags
|
||||
|
||||
(STag (Name) @tag)
|
||||
|
||||
(ETag (Name) @tag)
|
||||
|
||||
(EmptyElemTag (Name) @tag)
|
||||
|
||||
;; Attributes
|
||||
|
||||
(Attribute (Name) @tag.attribute)
|
||||
|
||||
(Attribute (AttValue) @string)
|
||||
|
||||
;; Text
|
||||
(Attribute
|
||||
(AttValue) @string)
|
||||
|
||||
; Text
|
||||
(CharData) @none @spell
|
||||
|
||||
((CDSect
|
||||
(CDStart) @markup.environment
|
||||
(CData) @markup.raw
|
||||
"]]>" @markup.environment)
|
||||
(#set! "priority" 105))
|
||||
(#set! "priority" 105))
|
||||
|
||||
;; Delimiters & punctuation
|
||||
|
||||
[ "<" "</" "/>" ] @tag.delimiter
|
||||
; Delimiters & punctuation
|
||||
[
|
||||
"<"
|
||||
"</"
|
||||
"/>"
|
||||
] @tag.delimiter
|
||||
|
||||
"]" @punctuation.bracket
|
||||
|
|
|
|||
|
|
@ -1,29 +1,31 @@
|
|||
((Comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((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"))
|
||||
(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"))
|
||||
(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"))
|
||||
(STag
|
||||
(Name) @_name)
|
||||
(content) @injection.content)
|
||||
(#eq? @_name "pma:table")
|
||||
(#set! injection.combined)
|
||||
(#set! injection.include-children)
|
||||
(#set! injection.language "sql"))
|
||||
|
|
|
|||
|
|
@ -1,25 +1,35 @@
|
|||
;; tags
|
||||
|
||||
(elementdecl (Name) @local.definition.type)
|
||||
; tags
|
||||
(elementdecl
|
||||
(Name) @local.definition.type)
|
||||
|
||||
(elementdecl
|
||||
(contentspec
|
||||
(children (Name) @local.reference)))
|
||||
(children
|
||||
(Name) @local.reference)))
|
||||
|
||||
(AttlistDecl . (Name) @local.reference)
|
||||
(AttlistDecl
|
||||
.
|
||||
(Name) @local.reference)
|
||||
|
||||
(STag (Name) @local.reference)
|
||||
(ETag (Name) @local.reference)
|
||||
(EmptyElemTag (Name) @local.reference)
|
||||
(STag
|
||||
(Name) @local.reference)
|
||||
|
||||
;; attributes
|
||||
(ETag
|
||||
(Name) @local.reference)
|
||||
|
||||
(AttDef (Name) @local.definition.field)
|
||||
(EmptyElemTag
|
||||
(Name) @local.reference)
|
||||
|
||||
(Attribute (Name) @local.reference)
|
||||
; attributes
|
||||
(AttDef
|
||||
(Name) @local.definition.field)
|
||||
|
||||
;; entities
|
||||
(Attribute
|
||||
(Name) @local.reference)
|
||||
|
||||
(GEDecl (Name) @local.definition.macro)
|
||||
; entities
|
||||
(GEDecl
|
||||
(Name) @local.definition.macro)
|
||||
|
||||
(EntityRef (Name) @local.reference)
|
||||
(EntityRef
|
||||
(Name) @local.reference)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue