You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Format action disabled when editing pom.xml file in source editor #1660
Having the latest lsp4e installed and editing a pom.xml file in the source editor, the Format menu item (in the context-menu) is disabled. The keyboard shortcut for that action doesn't work either.
This seems to be a regression, it seems to work fine with lsp4e 0.19.13.
This also seems to be like a high severity item, since I guess many people would stumble upon when after upgrading to or downloading Eclipse 2026-12.
changed the title [-]Format action disabled when editing `pom.xml` file in source editorr[/-][+]Format action disabled when editing `pom.xml` file in source editor[/+]on Nov 23, 2026
LSP4E 0.30.9 started telling servers that it supports dynamic registration for textDocument/rangeFormatting (commit a341692). When a client says that, LemMinX stops declaring range formatting when the server starts. It registers formatting and range formatting later instead, but only if its xml.format.enabled setting is true.
Wild Web Developer sends a number of xml.format.* settings but never xml.format.enabled. LemMinX's XMLFormattingOptions defaults enabled to false, and merge() copies that value over the server's default of true. As a result, LemMinX turns formatting off and never registers it, so LSP4E correctly sees that the server can't format and disables the Format action.
Before 0.30.9 this only worked by accident: LemMinX declared documentRangeFormattingProvider=true at startup, and LSP4E used range formatting over the whole document. I reproduced this against LemMinX 0.31.2. With the dynamic range-formatting capability, no formatting registration is sent unless xml.format.enabled=true is passed, and when it is passed, both registrations arrive as expected.
The underlying bug is in LemMinX, could you file a bug with them?
LSP4E 0.30.9 started telling servers that it supports dynamic registration for textDocument/rangeFormatting (commit a341692). When a client says that, LemMinX stops declaring range formatting when the server starts. It registers formatting and range formatting later instead, but only if its xml.format.enabled setting is true.
Wild Web Developer sends a number of xml.format.* settings but never xml.format.enabled. LemMinX's XMLFormattingOptions defaults enabled to false, and merge() copies that value over the server's default of true. As a result, LemMinX turns formatting off and never registers it, so LSP4E correctly sees that the server can't format and disables the Format action.
Before 0.30.9 this only worked by accident: LemMinX declared documentRangeFormattingProvider=true at startup, and LSP4E used range formatting over the whole document. I reproduced this against LemMinX 0.31.2. With the dynamic range-formatting capability, no formatting registration is sent unless xml.format.enabled=true is passed, and when it is passed, both registrations arrive as expected.
The underlying bug is in LemMinX, could you file a bug with them?
I will look into this; however, please be aware that formatting has long been functional in VS Code. I therefore suspect the bug lies on the LSP4E or WWD side, but let me investigate your issue.
Activity
[-]Format action disabled when editing `pom.xml` file in source editorr[/-][+]Format action disabled when editing `pom.xml` file in source editor[/+]rubenporras commentedon Nov 23, 2026
Hi @martinlippert ,
thanks for the report. I think it is so:
LSP4E 0.30.9 started telling servers that it supports dynamic registration for textDocument/rangeFormatting (commit a341692). When a client says that, LemMinX stops declaring range formatting when the server starts. It registers formatting and range formatting later instead, but only if its xml.format.enabled setting is true.
Wild Web Developer sends a number of xml.format.* settings but never xml.format.enabled. LemMinX's XMLFormattingOptions defaults enabled to false, and merge() copies that value over the server's default of true. As a result, LemMinX turns formatting off and never registers it, so LSP4E correctly sees that the server can't format and disables the Format action.
Before 0.30.9 this only worked by accident: LemMinX declared documentRangeFormattingProvider=true at startup, and LSP4E used range formatting over the whole document. I reproduced this against LemMinX 0.31.2. With the dynamic range-formatting capability, no formatting registration is sent unless xml.format.enabled=true is passed, and when it is passed, both registrations arrive as expected.
The underlying bug is in LemMinX, could you file a bug with them?
martinlippert commentedon Nov 23, 2026
Thank you very very much @rubenporras for the detailed analysis, very very much appreciated. I filed an issue for lemminx: eclipse-lemminx/lemminx#1928.
angelozerr commentedon Nov 23, 2026
Hi @rubenporras,
I will look into this; however, please be aware that formatting has long been functional in VS Code. I therefore suspect the bug lies on the LSP4E or WWD side, but let me investigate your issue.
angelozerr commentedon Nov 23, 2026
Good catch @rubenporras !
I can reproduce the issue with vscode xml when it doesnt send the xml.fromat.enabled.
But please note that incomming LemMinx release should not be integrated in WWD before lemminx-maven migrate to LSP4J 1.0.0 since LemMinx did that.
I plan to do a LemMinx release, but I don't know when lemminx maven will able to do a release
//cc @vrubezhny @akurtakov