aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authorAmaan Qureshi <amaanq12@gmail.com>2024-10-15 12:06:00 -0400
committerChristian Clason <ch.clason+github@icloud.com>2024-10-16 08:35:54 +0200
commited438691dfa47a9920f5d393b2217c98619f5432 (patch)
tree9e4ec50ba105de65b5f2ac4783b99adce98120b1 /queries
parentfix(tlaplus): remove unused rules (diff)
downloadnvim-treesitter-ed438691dfa47a9920f5d393b2217c98619f5432.tar
nvim-treesitter-ed438691dfa47a9920f5d393b2217c98619f5432.tar.gz
nvim-treesitter-ed438691dfa47a9920f5d393b2217c98619f5432.tar.bz2
nvim-treesitter-ed438691dfa47a9920f5d393b2217c98619f5432.tar.lz
nvim-treesitter-ed438691dfa47a9920f5d393b2217c98619f5432.tar.xz
nvim-treesitter-ed438691dfa47a9920f5d393b2217c98619f5432.tar.zst
nvim-treesitter-ed438691dfa47a9920f5d393b2217c98619f5432.zip
fix(xml): remove unused rules
Diffstat (limited to 'queries')
-rw-r--r--queries/xml/highlights.scm149
1 files changed, 148 insertions, 1 deletions
diff --git a/queries/xml/highlights.scm b/queries/xml/highlights.scm
index fc15343da..c6362c5c7 100644
--- a/queries/xml/highlights.scm
+++ b/queries/xml/highlights.scm
@@ -1,4 +1,151 @@
-; inherits: dtd
+; XML declaration
+(XMLDecl
+ "xml" @keyword.directive)
+
+(XMLDecl
+ [
+ "version"
+ "encoding"
+ ] @tag.attribute)
+
+(XMLDecl
+ (EncName) @string.special)
+
+(XMLDecl
+ (VersionNum) @number)
+
+; 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)
+
+(NotationDecl
+ (ExternalID
+ (SystemLiteral
+ (URI) @string.special.url))
+ (#set! priority 105))
+
+; 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 "&amp;" "&lt;" "&gt;" "&quot;" "&apos;"))
+
+(CharRef) @character
+
+(PEReference) @function.macro
+
+; External references
+[
+ "PUBLIC"
+ "SYSTEM"
+] @keyword
+
+(PubidLiteral) @string.special
+
+(SystemLiteral
+ (URI) @string.special.url)
+
+; Delimiters & punctuation
+[
+ "<?"
+ "?>"
+ "<!"
+ ">"
+ "]]>"
+] @tag.delimiter
+
+[
+ "("
+ ")"
+ "["
+] @punctuation.bracket
+
+[
+ "\""
+ "'"
+] @punctuation.delimiter
+
+[
+ ","
+ "|"
+ "="
+] @operator
+
+; Misc
+(Comment) @comment @spell
; XML declaration
(XMLDecl