Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin is not recognized as a XML formatter #154

Closed
peterkeller opened this issue Jun 7, 2019 · 9 comments
Closed

Plugin is not recognized as a XML formatter #154

peterkeller opened this issue Jun 7, 2019 · 9 comments
Assignees
Labels
bug Something isn't working formatting
Milestone

Comments

@peterkeller
Copy link

peterkeller commented Jun 7, 2019

Even if the plugin is installed, it isn't recognized as a suitable XML formatter when trying to format a XML document, but the message "There is no formatter for 'xml'-files installed" is shown instead.

Screenshot 2019-06-07 at 09 55 52

@NikolasKomonen
Copy link
Contributor

Could you try disabling all extensions, then enabling only the XML one.

Also just to verify, do you have a JDK installed an setup? Are features like autocompletion or linting working?

Another thing to check is the preference "xml.format.enabled" and make sure that is 'true'

@raduspantu
Copy link

hello @NikolasKomonen ,

this is the same for me.
I already disabled all my extensions and this is still not working.
image

Also my JAVA_HOME directory is set
image

@xorye
Copy link

xorye commented Jun 13, 2019

Thank you for reporting this issue.

Could you please go to the command palette (Ctrl+Shift+P), run "Show Running Extensions" and verify that the extension is running?

If the extension is running, it should look like this:
image

Are features like auto completion and linting working at all?

Are you attempting to format by clicking "Format Document" in the right-click context menu, or are you using Ctrl+Shift+I ? Does the "Format Document" option exist?

@peterkeller
Copy link
Author

After disabling all extensions and enable this plugin again, everything works as expected. Now, I am enabling the other disabled extensions again. So far, there are no problems.

Thanks.

@raduspantu
Copy link

@xorye ,

After leaving it alone and focusing on other tasks, I see that now is working, also with other extensions.
What I haven't done until now, is saving the file as an XML, only formatted as an XML; should this be an issue?

Also, Ctrl+Shift+I enables a multi-line for me, but that one I think is a thing from my settings.
It's working now, adding the mention that the file must be saved as an XML before it could recognize the errors, formatting and so on.

Maybe there is something that I am doing wrong...?

@xorye
Copy link

xorye commented Jun 14, 2019

This definitely seems like an issue with the XML extension. I was able to reproduce the issue and am currently investigating it.

@fbricon
Copy link
Collaborator

fbricon commented Jun 17, 2019

Until the next release that fixes this issue, as a workaround, just save your document as an xml file.

@fbricon fbricon closed this as completed Jun 17, 2019
@fbricon fbricon added bug Something isn't working formatting labels Jun 17, 2019
@TBemrose
Copy link

TBemrose commented Jan 18, 2023

I'm having the same issue, but saving the new file doesn't fix the problem. I've enabled/disabled the other extensions until I found the culprit: ms-toolsai.jupyter-keymap

If redhat.vscode-xml is loaded first, I can't format XML. if redhat.vscode-xml is loaded after ms-toolsai.jupyter-keymap then I can format XML (with all extensions enabled). I rarely use Jupyter and haven't tested whether loading them in this order inhibits any features of that extension.

microsoft/vscode-jupyter-keymap#19

@angelozerr
Copy link
Contributor

@TBemrose do you benefit with other features like validation when you have the XML formatter problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working formatting
Projects
None yet
Development

No branches or pull requests

7 participants