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

[preferences] Add ability to set default formatter #8354

Closed
danieltomasku opened this issue Aug 11, 2020 · 2 comments · Fixed by #8446
Closed

[preferences] Add ability to set default formatter #8354

danieltomasku opened this issue Aug 11, 2020 · 2 comments · Fixed by #8446
Assignees
Labels
editor issues related to the editor help wanted issues meant to be picked up, require help preferences issues related to preferences vscode issues related to VSCode compatibility

Comments

@danieltomasku
Copy link
Contributor

Feature Description:

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",
},
@vince-fugnitto vince-fugnitto added editor issues related to the editor preferences issues related to preferences vscode issues related to VSCode compatibility labels Aug 12, 2020
@akosyakov akosyakov added the help wanted issues meant to be picked up, require help label Aug 12, 2020
@vitaliy-guliy
Copy link
Contributor

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

Screenshot from 2020-08-13 17-28-55

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 eclipse-che/che#17560

@akosyakov @vince-fugnitto we can implement it, as we are already investigating the problem. WDYT?

@vince-fugnitto
Copy link
Member

@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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor issues related to the editor help wanted issues meant to be picked up, require help preferences issues related to preferences vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants