redhat-developer / redhat-developer/vscode-java

There is no formatter for 'java' files installed

Đang mở
#1,736 3 bình luận 5 reaction 1 người được giao Xem trên GitHub

@testforstephen đang làm issue này rồi.

Từ ngày 18/12/2020.

formatter
Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
546
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

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
  1. Install visual code
  2. Init java project (with gradle) then create a new class
  3. 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 )

https://github.com/redhat-developer/vscode-java/issues/158

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
}

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.