Thufir
Thufir

Reputation: 8487

There is no formatter for 'java' files installed in VSCode

I was able to format Java code in VSCode, but now I see "there is no formatter for 'java' files installed." as:

screenshot

Certainly language support is provided through the redhat language support plugin. Can this be re-initialized, perhaps?

Looks to be a problem others have at least seen, although the error message might be slightly different.

Version info:

Version: 1.41.1
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T15:04:31.999Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 4.18.0-25-generic snap

Upvotes: 11

Views: 11876

Answers (4)

dean
dean

Reputation: 23

I had the same issue: There is no formatter for 'typescript'.. Then I checked if I was logged in VSCode (bottom left button in VSCode) and I was not. so I logged in again and the problem was solved.

Upvotes: 0

Paul Sender
Paul Sender

Reputation: 488

Check your settings.json (mine was in .vscode). Update this to:

"java.format.enable": true,

Mine was set to false.

Upvotes: 2

Kaveri Nikunj Patel
Kaveri Nikunj Patel

Reputation: 11

Click on Disable All Installed Extensions and then click on Enable All Extensions

Upvotes: 1

Ani David
Ani David

Reputation: 141

Everything worked fine until today. I didn't update or change anything in vs code. But today I had the same error for typescript files: "Sorry, but there is no formatter for 'typescript'-files installed" Explicitly setting typescript.format.enable to true fixed it.

Upvotes: 2

Related Questions