Reformat on Save is not Working

Answered

I have this turned on but even after doing CTRL+S it is not formatting the code. I have to use the Reformat Code option individually.

 

Logs file on Google Drive, check out here. I can only upload images directly here.

3
17 comments

Hello,

Please attach idea.log ("Help | Show Log in...") after restarting IDE and reproducing the issue. 

0

I cannot attach it, it is only allowing to upload images. So, I have made it public on Google Drive. Check it out here.

1

Is it reproducible with custom plugins disabled:

```

2022-03-09 17:10:32,694 [   1691]   INFO - llij.ide.plugins.PluginManager - Loaded custom plugins: Xcode-Dark Theme (1.2.4), Monokai Pro Theme (1.6), Dracula Theme (1.13.1), One Dark theme (5.5.0), Dark Purple Theme (1.3), VSCode Keymap (213.5744.3), Kotlin (213-1.6.10-release-961-IJ6777.52), SmartSemicolon (1.2), Material Theme UI (6.13.0) 

```

0

I tried but it is the same. Reformat on save does not work and I have to use a keymap which works.

0

Do you face this issue with every file type? Could you please try with 2022 version?

0

Yes, it is not formatting on other file types either. What do you mean by the 2022 version?

0
0

Still present in 2022.2.2

0

Still not working for me in 2022.2.4. It worked with what I had ~3-4 weeks ago, but having reinstalled my OS and CLion it now no longer works?

0

Could you please share idea.log ("Help | Show Log in...") after restarting IDE and reproducing the issue?

0

We share the same troubles with reformat on save. It is working... sometimes. using ClangFormat

0

is there a trace option that we can enable to gather more context?

0

Is it possible to share logs first?

0

Thanks! I see it's in progress. Please follow it for updates.

0

I discovered this problem while running 2021.3.4. Saving a file would not reformat, but editing a file and "save all files" did reformat. I updated to 2022.3.1 and now neither action causes reformatting to happen.

0

The 2021 version I was running on, format on save would work fine. Yesterday, I updated to 2022.3 Build #IC-223.7571.182 and now neither save nor save all will reformat on save. Manually running the action will work.   I am working with Java files.

Update - I use the plugin Adapter for Eclipse Code Formatter. Disabling it, restarting IntelliJ, then enabling it and restarting IntelliJ fixed the issue.

1

Please sign in to leave a comment.