-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[XML] Add scope based folding #3783
[XML] Add scope based folding #3783
Conversation
This commit changes scopes of parentheses to `punctuation.section.group`.
Nice. I'm on a phone, so I don't have my ST up, but I'm hoping the CDATA change simplifies some color scheme stuff I am doing as well as the fold improvements. |
This PR just adds another sub-scope to some of the punctuation in order to use them as unique fold markers. I don't think those changes are a game changer for highlighting. Hence I wonder, what kind of simplifactions you are looking for. |
I have this monster to tweak the open/close tags on CDATA {
"name": "CDATA Punctuation",
"scope": "(meta.tag.cdata | meta.tag.sgml.cdata) & (entity.name.tag.cdata | punctuation.definition.tag.begin | punctuation.definition.tag.end | keyword.declaration.cdata)",
"foreground": "var(white4)",
"font_style": "",
}, I'm not sure I remember how it was all put together. It may include some old convention and/or a difference in HTML syntaxes as well. |
HTML and XML have been aligned to use |
This commit fixes an issue, which confused syntax based folding, if fully qualified tag names are involved. ```xml <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="Data"> <xs:complexType> <xs:sequence> <!--Allowing arbitrary element names--> <xs:any maxOccurs="unbounded" processContents="lax"/> </xs:sequence> <!--Element names must be unique--> <xs:assert test="every $child in * satisfies not($child/preceding::*[name() = name($child)])"></xs:assert> </xs:complexType> </xs:element> </xs:schema> ```
This PR tweaks some scope names and adds rules for scope based folding.