mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(xml,dtd): add locals queries
This commit is contained in:
parent
9e5a34c2b9
commit
f1fc7c2e76
2 changed files with 32 additions and 0 deletions
7
queries/dtd/locals.scm
Normal file
7
queries/dtd/locals.scm
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(elementdecl (Name) @definition.type)
|
||||
|
||||
(elementdecl
|
||||
(contentspec
|
||||
(children (Name) @reference)))
|
||||
|
||||
(AttlistDecl . (Name) @reference)
|
||||
25
queries/xml/locals.scm
Normal file
25
queries/xml/locals.scm
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
;; tags
|
||||
|
||||
(elementdecl (Name) @definition.type)
|
||||
|
||||
(elementdecl
|
||||
(contentspec
|
||||
(children (Name) @reference)))
|
||||
|
||||
(AttlistDecl . (Name) @reference)
|
||||
|
||||
(STag (Name) @reference)
|
||||
(ETag (Name) @reference)
|
||||
(EmptyElemTag (Name) @reference)
|
||||
|
||||
;; attributes
|
||||
|
||||
(AttDef (Name) @definition.field)
|
||||
|
||||
(Attribute (Name) @reference)
|
||||
|
||||
;; entities
|
||||
|
||||
(GEDecl (Name) @definition.macro)
|
||||
|
||||
(EntityRef (Name) @reference)
|
||||
Loading…
Add table
Add a link
Reference in a new issue