Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

add xml.fileAssociations configuration item #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion xml/src/browser/xml-preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ export const XMLConfigSchema: PreferenceSchema = {
"default": true,
"description": "Insert space before end of self closing tag. \nExample:\n <tag/> -> <tag />"
},
"xml.fileAssociations": {
"type": "array",
"default": [],
"items": {
"type": "object",
"properties": {
"systemId": {
"type": "string",
"description": "The path or URL to the XML schema (XSD or DTD)"
},
"pattern": {
"type": "string",
"description": "File glob pattern. Example: **/*.Format.ps1xml\n\nMore information on the glob syntax: https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob",
}
}
},
"description": "Allows XML schemas to be associated to file name patterns.\n\nExample:\n[{\n \"systemId\": \"path/to/file.xsd\",\n \"pattern\": \"file1.xml\"\n},\n{\n \"systemId\": \"http://www.w3.org/2001/XMLSchema.xsd\",\n \"pattern\": \"**/*.xsd\"\n}]",
},
"xml.logs.client": {
"type": "boolean",
"default": false,
Expand Down Expand Up @@ -70,4 +88,4 @@ export function bindXMLPreferences(bind: interfaces.Bind): void {
return createXMLPreferences(preferences);
});
bind(PreferenceContribution).toConstantValue({ schema: XMLConfigSchema });
}
}