-
Notifications
You must be signed in to change notification settings - Fork 82
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
Comments
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' |
hello @NikolasKomonen , this is the same for me. |
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. |
@xorye , After leaving it alone and focusing on other tasks, I see that now is working, also with other extensions. Also, Ctrl+Shift+I enables a multi-line for me, but that one I think is a thing from my settings. Maybe there is something that I am doing wrong...? |
This definitely seems like an issue with the XML extension. I was able to reproduce the issue and am currently investigating it. |
Until the next release that fixes this issue, as a workaround, just save your document as an xml file. |
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. |
@TBemrose do you benefit with other features like validation when you have the XML formatter problem? |
Why has this been closed? It is still not working for example on my machine. |
@xorye Could you let me know if there will be any fix done for that? It still occurs on my machine. |
@CezaryBD this issue was closed because it fixed the original problem. The formatting problem occurs générale when vscode xml cannot be started and it can comes from several reasons. Could tou try to install pre release https://github.com/redhat-developer/vscode-xml?tab=readme-ov-file#contributing ro check if it fixes your issue please. |
Thank you @angelozerr for fast response! Unfortunately I re-installed the extension a couple of times now, also using the pre-release version. It seems to not recognize the extension as the formatter. It says: There is no formatter for 'xml' files installed. |
If you write an invalid XML, do you see some errors? Could you enable trace with |
@angelozerr could you tell me please where can I do that? |
|
@angelozerr I think at the very end, the pre-release version is working with proxy being set up. |
You mean that with the pre release and config of proxy it is working? |
Probably yes. Although, I do not understand why a proxy config is needed for the extension to work, especially for a formatter :) |
Proxy is required to download some xsd dtd that you could reference in your xml. |
This is not working for me and I can't find a fix. This issue should not be closed. |
Still, I do not understand why an extension stops working when there is no proxy and why it is not using env variables set from the system level. |
Ok I reopen the issue, but I think the main problem is that vscode-xml extension cannot start.
Generally when the extension cannot be started it is because your Java install is not correct (you need Java because the XML language server is written in Java), but if you have not Java runtime you need to swith to binary mode . Try adding in your
Is it working better?
You need Java >=1.8 which is installed or declare
For your problem we need to understand if the problem is because xml extension can or cannot be started. (ex : type invalid XML syntax and you should see some error, in this case it means that xml extension can be started and it is perhaps a bug). To understand really what it happens, I suggest that you declare
and open and you should see some LSP traces that you could share in the issue to understand more what it happens: I suggest that you read https://github.com/redhat-developer/vscode-xml/blob/main/docs/Troubleshooting.md which explains more what I'm trying to explain you.
I agree that it is very strange. @datho7561 have you some idea? |
I suspect that the problem comes from the line code vscode-xml/src/settings/proxySettings.ts Line 78 in 0b30585
|
@CezaryBD I created the PR #1046 with your problem with proxy. @datho7561 please review it. |
@CezaryBD please paste your proxy settings (you can obfuscate the values), so we can ensure the format you use will be properly parsed and used. |
Basically my export http_proxy="127.0.0.1:3000"
export https_proxy=$http_proxy
export no_proxy=localhost,127.0.0.1
export HTTP_PROXY=$http_proxy
export NO_PROXY=$no_proxy
export HTTPS_PROXY=$https_proxy |
@angelozerr you need to fix the regexp so it can parse the value without a scheme (i.e. making @CezaryBD in the meantime, you can prepend your http_proxy value with |
@CezaryBD could you install pre-release and tell us if it it fixes your issue with proxy please. |
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.
The text was updated successfully, but these errors were encountered: