DotJoshJohnson / vscode-xml

XML Tools for Visual Studio Code
MIT License
322 stars 86 forks source link

Format Document support for unsaved documents in language mode XML #248

Closed piejanssens closed 5 years ago

piejanssens commented 5 years ago

Note: this is different from the "XML Tools: Format as XML" option.

I would rather see this supported than having a "extension: Format as X" option in the command palette for every single file type that exist 😉

Reproduce:

  1. Open new document
  2. Paste/write unformatted XML
  3. Bottom right toolbar: select language mode 'XML'
  4. 'Format Document': nothing happens

This vscode issue shows it's up to the extension to support this: https://github.com/Microsoft/vscode/issues/36165

DotJoshJohnson commented 5 years ago

I'm unable to reproduce this in the latest version of VS Code. It may be related to the XML you are trying to format. Can you provide an example of some XML you are able to reproduce this with? The "Format as XML" feature is just for use with file types that aren't recognized as XML (so .txt documents, for example, can be formatted if they contain XML).

vscode-xml_issue-248

piejanssens commented 5 years ago

Just tested on macOS and works good here. Will test on my work Win PC next week and reopen if necessary. Thanks.