diff options
| author | ObserverOfTime <chronobserver@disroot.org> | 2024-10-22 08:34:05 +0300 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2024-10-22 08:56:17 +0200 |
| commit | a5c7a3f6b46f4cbc3ee3d56f403afb6565291cae (patch) | |
| tree | a3e7cd631674848112f9eae7e255d964fb9e14ce | |
| parent | bot(lockfile): update swift, tlaplus, vimdoc, xresources (diff) | |
| download | nvim-treesitter-a5c7a3f6b46f4cbc3ee3d56f403afb6565291cae.tar nvim-treesitter-a5c7a3f6b46f4cbc3ee3d56f403afb6565291cae.tar.gz nvim-treesitter-a5c7a3f6b46f4cbc3ee3d56f403afb6565291cae.tar.bz2 nvim-treesitter-a5c7a3f6b46f4cbc3ee3d56f403afb6565291cae.tar.lz nvim-treesitter-a5c7a3f6b46f4cbc3ee3d56f403afb6565291cae.tar.xz nvim-treesitter-a5c7a3f6b46f4cbc3ee3d56f403afb6565291cae.tar.zst nvim-treesitter-a5c7a3f6b46f4cbc3ee3d56f403afb6565291cae.zip | |
fix(xml,dtd): adapt to parser changes
| -rw-r--r-- | lockfile.json | 4 | ||||
| -rw-r--r-- | queries/dtd/highlights.scm | 17 | ||||
| -rw-r--r-- | queries/xml/highlights.scm | 92 |
3 files changed, 47 insertions, 66 deletions
diff --git a/lockfile.json b/lockfile.json index 89dee9353..07d77054e 100644 --- a/lockfile.json +++ b/lockfile.json @@ -132,7 +132,7 @@ "revision": "ccd998f378c3f9345ea4eeb223f56d7b84d16687" }, "dtd": { - "revision": "809266ed1694d64dedc168a18893cc254e3edf7e" + "revision": "cd1316e476ec40da6ce1fb5749c9d7e6b4f1090c" }, "earthfile": { "revision": "1d637f2002bb8b22d4c08d26ad2bfbc22916f3ce" @@ -876,7 +876,7 @@ "revision": "fff3e72242aa110ebba6441946ea4d12d200fa68" }, "xml": { - "revision": "809266ed1694d64dedc168a18893cc254e3edf7e" + "revision": "cd1316e476ec40da6ce1fb5749c9d7e6b4f1090c" }, "xresources": { "revision": "630af80f563ede09a652a808277950c36306e3a3" diff --git a/queries/dtd/highlights.scm b/queries/dtd/highlights.scm index e573ca387..9afd6e38b 100644 --- a/queries/dtd/highlights.scm +++ b/queries/dtd/highlights.scm @@ -1,17 +1,17 @@ -; XML declaration -(XMLDecl +; Text declaration +(TextDecl "xml" @keyword.directive) -(XMLDecl +(TextDecl [ "version" "encoding" ] @tag.attribute) -(XMLDecl +(TextDecl (EncName) @string.special) -(XMLDecl +(TextDecl (VersionNum) @number) ; Processing instructions @@ -65,12 +65,6 @@ "NOTATION" @keyword.directive (Name) @label) -(NotationDecl - (ExternalID - (SystemLiteral - (URI) @string.special.url)) - (#set! priority 105)) - ; Attlist declaration (AttlistDecl "ATTLIST" @keyword.directive.define @@ -124,6 +118,7 @@ "?>" "<!" ">" + "<![" "]]>" ] @tag.delimiter diff --git a/queries/xml/highlights.scm b/queries/xml/highlights.scm index c6362c5c7..85e6e9bb4 100644 --- a/queries/xml/highlights.scm +++ b/queries/xml/highlights.scm @@ -6,6 +6,7 @@ [ "version" "encoding" + "standalone" ] @tag.attribute) (XMLDecl @@ -14,6 +15,12 @@ (XMLDecl (VersionNum) @number) +(XMLDecl + [ + "yes" + "no" + ] @boolean) + ; Processing instructions (PI) @keyword.directive @@ -65,12 +72,6 @@ "NOTATION" @keyword.directive (Name) @label) -(NotationDecl - (ExternalID - (SystemLiteral - (URI) @string.special.url)) - (#set! priority 105)) - ; Attlist declaration (AttlistDecl "ATTLIST" @keyword.directive.define @@ -118,45 +119,6 @@ (SystemLiteral (URI) @string.special.url) -; Delimiters & punctuation -[ - "<?" - "?>" - "<!" - ">" - "]]>" -] @tag.delimiter - -[ - "(" - ")" - "[" -] @punctuation.bracket - -[ - "\"" - "'" -] @punctuation.delimiter - -[ - "," - "|" - "=" -] @operator - -; Misc -(Comment) @comment @spell - -; XML declaration -(XMLDecl - "standalone" @tag.attribute) - -(XMLDecl - [ - "yes" - "no" - ] @boolean) - ; Processing instructions (XmlModelPI "xml-model" @keyword.directive) @@ -194,6 +156,36 @@ (Attribute (AttValue) @string) +; Delimiters & punctuation +[ + "<?" + "?>" + "<" + ">" + "</" + "/>" + "<!" + "]]>" +] @tag.delimiter + +[ + "(" + ")" + "[" + "]" +] @punctuation.bracket + +[ + "\"" + "'" +] @punctuation.delimiter + +[ + "," + "|" + "=" +] @operator + ; Text (CharData) @none @spell @@ -203,11 +195,5 @@ "]]>" @module) (#set! priority 105)) -; Delimiters & punctuation -[ - "<" - "</" - "/>" -] @tag.delimiter - -"]" @punctuation.bracket +; Misc +(Comment) @comment @spell |
