feat: add xsl formatting support

fixes #55
This commit is contained in:
Josh Johnson 2016-05-17 22:42:12 -04:00
parent b55c314aa4
commit 51d14fcd1c
2 changed files with 4 additions and 2 deletions

View File

@ -114,6 +114,7 @@
},
"activationEvents": [
"onLanguage:xml",
"onLanguage:xsl",
"onLanguage:xquery",
"onCommand:xmlTools.minifyXml",
"onCommand:xmlTools.evaluateXPath",

View File

@ -11,6 +11,7 @@ export var GlobalState: vsc.Memento;
export var WorkspaceState: vsc.Memento;
const LANG_XML: string = 'xml';
const LANG_XSL: string = 'xsl';
const LANG_XQUERY: string = 'xquery;'
const MEM_QUERY_HISTORY: string = 'xpathQueryHistory';
@ -30,8 +31,8 @@ export function activate(ctx: vsc.ExtensionContext) {
// register language feature providers
ctx.subscriptions.push(
vsc.languages.registerDocumentFormattingEditProvider(LANG_XML, new XmlFormattingEditProvider()),
vsc.languages.registerDocumentRangeFormattingEditProvider(LANG_XML, new XmlFormattingEditProvider()),
vsc.languages.registerDocumentFormattingEditProvider([LANG_XML, LANG_XSL], new XmlFormattingEditProvider()),
vsc.languages.registerDocumentRangeFormattingEditProvider([LANG_XML, LANG_XSL], new XmlFormattingEditProvider()),
vsc.languages.registerCompletionItemProvider(LANG_XQUERY, new XQueryCompletionItemProvider(), ':', '$')
);