redhat-developer / redhat-developer/vscode-java
There is no formatter for 'java' files installed
@testforstephen is already working on this.
Since Dec 18, 2020.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
Hello,
I try to format my java code with visual code.
I have try without configuration (for a default format) > and I have the message : There is no formatter for 'java' files installed
I have tried to follow https://github.com/redhat-developer/vscode-java/wiki/Formatter-settings >> then idem
Environment
- Windows 10
- JDK 12
- 1.51.1
- Java extension version: v0.12.0
Steps To Reproduce
- Install visual code
- Init java project (with gradle) then create a new class
- CTRL + P > format document > There is no formatter for 'java' files installed
As said on https://github.com/redhat-developer/vscode-java/issues/1497
I have tried added "[java]": {"editor.defaultFormatter": "redhat.java"} on settings.json
(Precision : My starting java server is starting and loop at 62% Starting java language server - build parameterized mode .... gradle.eclipse .....)
(will work when I desactivate Gradle importing project (aka "java.import.gradle.enabled": false )
Setting.json
{
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"files.exclude": {
"/.classpath": true,
"/.project": true,
"/.settings": true,
"/.factorypath": true
},
"[java]": {"editor.defaultFormatter": "redhat.java"},
"java.configuration.runtimes": [
{
"name": "JavaSE-1.8",
"path": "C:\Program Files\Java\jdk1.8.0_261"
}
],
"java.home": "C:\Program Files\Java\jdk-12.0.2",
"java.help.firstView": "gettingStarted",
"java.project.importOnFirstTimeStartup": "automatic",
"explorer.compactFolders": false,
"workbench.enableExperiments": false
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.