XML
XML syntax highlighting is supported natively.
- Tree-sitter: tree-sitter-grammars/tree-sitter-xml
Configuration
If you have additional file extensions that are not being automatically recognized as XML just add them to file_types in your Gram settings:
"file_types": {
"XML": ["rdf", "gpx", "kml"]
}
Formatters
You can also set a different formatter for XML files through the language specific configuration. xmllint is a popular XML parsing tool that can also format XML files, and usually is pre-installed, as part of libxml2:
"languages": {
"XML": {
"formatter": {
"external": {
"command": "xmllint",
"arguments": ["--format", "-"]
},
}
}
}