Support initial batch of languages

This commit is contained in:
2025-06-14 13:35:39 -04:00
parent 34373e04d7
commit d68a3e73b3
47 changed files with 668 additions and 184 deletions
+29
View File
@@ -0,0 +1,29 @@
//go:build stxXml || stxAll
package syntax
func init() {
syntaxMap["xml"] = &lazySyntax{init: func() []byte {
return []byte(`filetype: xml
detect:
filename: "\\.(xml|sgml?|rng|plist)$"
header: "(<rss|<!DOCTYPE|<xsd|<\\?xml)"
rules:
- type: "(<(/)?[a-zA-Z:]+>)"
- type: "(<(/)?[a-zA-Z:]+[[:space:]]+)"
- constant.specialChar: '[a-zA-Z0-9]+="(.*)+"'
- statement: '([a-zA-Z0-9]+)='
- type: "(([[:space:]])?/?>([[:space:]]+)?$)"
- comment:
start: "<!DOCTYPE"
end: "[/]?>"
rules: []
- comment:
start: "<!--"
end: "-->"
rules: []
- special: "&[^;]*;"`)
}}
}