Skip to content

Commit a179451

Browse files
angelozerrdatho7561
authored andcommitted
Support identation for XML contributed languages
Signed-off-by: azerr <[email protected]>
1 parent 65b772e commit a179451

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/extension.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ export async function activate(context: ExtensionContext): Promise<XMLExtensionA
3636

3737
registerClientOnlyCommands(context);
3838

39-
languages.setLanguageConfiguration('xml', getIndentationRules());
40-
languages.setLanguageConfiguration('xsl', getIndentationRules());
39+
// Update indentation rules for all language which are XML.
40+
XML_SUPPORTED_LANGUAGE_IDS.forEach(l => {
41+
const languageId = <string> l;
42+
languages.setLanguageConfiguration(languageId, getIndentationRules());
43+
});
44+
4145
// Register in the context 'xml.supportedLanguageIds' to use it in command when condition in package.json
4246
commands.executeCommand('setContext', 'xml.supportedLanguageIds', XML_SUPPORTED_LANGUAGE_IDS);
4347

0 commit comments

Comments
 (0)