diff --git a/package.json b/package.json index 24ad42e..9c9feea 100644 --- a/package.json +++ b/package.json @@ -114,6 +114,7 @@ }, "activationEvents": [ "onLanguage:xml", + "onLanguage:xsl", "onLanguage:xquery", "onCommand:xmlTools.minifyXml", "onCommand:xmlTools.evaluateXPath", diff --git a/src/Extension.ts b/src/Extension.ts index 9d4c562..fd23a79 100644 --- a/src/Extension.ts +++ b/src/Extension.ts @@ -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(), ':', '$') );