Currently, there is no way to set a default formatter in Theia. This is especially useful for setting a default formatter for a specific language, where in some cases two plugins may be trying to contribute formatting functionality for the same language.
This can be done in VS Code with the editor.defaultFormatter property:
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features",
},
Che-Theia has the same issue. The formatting of Java files does not work when Che-Theia is running with following extensions
- https://download.jboss.org/jbosstools/vscode/3rdparty/vscode-java-debug/vscode-java-debug-0.26.0.vsix
- https://download.jboss.org/jbosstools/static/jdt.ls/stable/java-0.63.0-2222.vsix
- https://download.jboss.org/jbosstools/vscode/stable/vscode-quarkus/vscode-quarkus-1.5.0-324.vsix

Tested those extensions with vanilla Theia and got the same result. 'Format document' menu item is enabled, but clicking on it does nothing. And there is no any errors in browser/backend console.
Tested the same on VS Code. It displays a popup with list of available formatters for current language.
Video demonstrating how VS Code behaves https://www.youtube.com/watch?v=ekpMNaLvCWo
The original issue in Che repository https://github.com/eclipse/che/issues/17560
@akosyakov @vince-fugnitto we can implement it, as we are already investigating the problem. WDYT?
@akosyakov @vince-fugnitto we can implement it, as we are already investigating the problem. WDYT?
Please go ahead :) You can assign yourself to the issue if you'd like to implement the feature :+1:
Most helpful comment
Please go ahead :) You can assign yourself to the issue if you'd like to implement the feature :+1: