forked from external/vscode-xml
		
	Register Format XML Command
This commit is contained in:
		
							parent
							
								
									8c452f6982
								
							
						
					
					
						commit
						601fa1bfe4
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -13,6 +13,11 @@ export function activate(ctx: ExtensionContext) {
 | 
			
		|||
	ctx.subscriptions.push(commands.registerTextEditorCommand('xmltools.linearizeXml', linearizeXml));
 | 
			
		||||
	ctx.subscriptions.push(commands.registerTextEditorCommand('xmltools.evaluateXPath', evaluateXPath));
 | 
			
		||||
	
 | 
			
		||||
	// alias for editor.action.format
 | 
			
		||||
	ctx.subscriptions.push(commands.registerTextEditorCommand('xmlTools.formatXml', () => {
 | 
			
		||||
		commands.executeCommand('editor.action.format');
 | 
			
		||||
	}));
 | 
			
		||||
	
 | 
			
		||||
	// register formatting providers
 | 
			
		||||
	ctx.subscriptions.push(languages.registerDocumentFormattingEditProvider('xml', new XmlDocumentFormattingProvider()));
 | 
			
		||||
	ctx.subscriptions.push(languages.registerDocumentRangeFormattingEditProvider('xml', new XmlRangeFormattingProvider()));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue