Code styles are applied on a project level. There is no global setting. You can set a default style via Settings > Other Settings > Default Settings > [Template Project Settings] > Code Style Any new project will use that style.

That said... when you reformat you should get the styles you set. You need to verify that the configuration you created is set in the Settings > [Project Settings] > Code Style --> Scheme dialog. I seen some case where the default is actually reselected by mistake. You may want to double check the specific setting options in that scheme. Make sure the same code that is shown looks exactly like what you want.

Then run a code Layout reformat (Ctrl+Alt+L)

Answer from Javaru on Stack Overflow
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 207032465-Reformat-code-Ctrl-Alt-L-is-not-working
Reformat code Ctrl+Alt+L is not working – IDEs Support (IntelliJ Platform) | JetBrains
April 19, 2005 - ... Pavantobhan, you can also remove the Mouse without border shortcut by going in "Other Options" and selecting "Disable" for the shortcuts you want to deactivate. ... Make sure the shortcut is not intercepted by other software in your OS.
Discussions

Reformatting my code in IntelliJ isn't working.
Ian McKellar is having issues with: So as far as I can see I've try everything. Obviously I haven't otherwise I wouldn't be here though :D. So I press Crtl + Alt + L and I... More on teamtreehouse.com
🌐 teamtreehouse.com
1
June 26, 2017
"Reformat Code" can not be called via the shortcut "⌘⌥L"
Review its shortcut in settings. More on reddit.com
🌐 r/Jetbrains
5
6
November 21, 2024
Reformat code via keyboard shortcut doesn't work in IntelliJ - Stack Overflow
Bring the best of human thought ... at your work. Explore Stack Internal ... Save this question. Show activity on this post. I have a Java project in IntelliJ under Windows. I'm trying to format code by using Ctrl+Alt+L combination, but this does nothing. In case use the menu Code -> Reformat Code the code ... More on stackoverflow.com
🌐 stackoverflow.com
Reformat code in IntelliJ IDEA (macOS) does not work - Stack Overflow
Use IntelliJ IDEA for macOS. Problem Whenever I do ⌥+⌘+L (shortcut to reformat code in macOS), code clean up does not apply. I noticed that because I turned on the Final Modifier already (Make gen... More on stackoverflow.com
🌐 stackoverflow.com
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 4571733653650-Reformat-on-Save-is-not-Working
Reformat on Save is not Working – IDEs Support (IntelliJ Platform) | JetBrains
March 9, 2022 - 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.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 13134493544850-Reformat-On-Save-doesn-t-work
Reformat On Save doesn't work – IDEs Support (IntelliJ Platform) | JetBrains
August 17, 2023 - Hi! I'm using IntelliJ 2023.1.1. When I try to save a file it doesn't run Prettier or ESLint, while I have this on Actions on Save: Tried it with adding a lot of extra lines to it, but NO success. If I right click in the file and click on Reformat with Prettier this does work.
🌐
JetBrains
jetbrains.com › help › idea › reformat-and-rearrange-code.html
Reformat code | IntelliJ IDEA Documentation
4 weeks ago - IntelliJ IDEA can apply your code style formatting to the specified files from the command line. Make sure you have a command-line launcher for your OS. Run the format command. Learn more from Format files from the command line. You can exclude a group of files and directories from reformatting, code arrangement, and import optimization. In the Settings dialog (Ctrl+Alt+S) , go to Editor | Code Style. Switch to the Formatter tab and in the Do not format field, enter the files and directories that you want to exclude using a glob pattern.
🌐
Reddit
reddit.com › r/jetbrains › "reformat code" can not be called via the shortcut "⌘⌥l"
r/Jetbrains on Reddit: "Reformat Code" can not be called via the shortcut "⌘⌥L"
November 21, 2024 -

If I open IntelliJ IDEA 2024.3 (Ultimate Edition) on macOS ⌘⌥L to reformat code works at first. After a while it stops working. After it stops working I still can reformat code via the Menubar.

Any thoughts?

Find elsewhere
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360002443759-Reformatting-Code-Style-doesn-t-do-anything
Reformatting/Code Style doesn't do anything – IDEs Support (IntelliJ Platform) | JetBrains
January 10, 2019 - But I noticed when I create a new project and open the Settings it works again. So it must be related to the project itself?! ... Must be. If it's acceptable for you, you can purge the .idea folder so that the project settings were reset. Or, you can first try removing just codeStyleSettings.xml.
🌐
Stack Overflow
stackoverflow.com › questions › 70888035 › reformat-code-in-intellij-idea-macos-does-not-work
Reformat code in IntelliJ IDEA (macOS) does not work - Stack Overflow
I noticed that because I turned on the Final Modifier already (Make generated local variables final and Make generated parameters final in Settings: Editor -> Code Style -> Java -> Code Generation). But after shortcut, no finals are added. However, if I do ⌥+⇧+⌘+L to open the reformat dialog and click run, it does add final to variables and parameters). It also work when I right click the file and choose reformat code.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 10615322815634-Reformat-code-does-not-work-properly
Reformat code does not work properly – IDEs Support (IntelliJ Platform) | JetBrains
March 20, 2023 - And you know what? I can compile and run my code properly. But Functions like 'Reformat Code' and 'File structure' all suddenly went wrong.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360008140999-Reformat-code-is-not-working-with-the-same-way-as-Code-Reformat-Code
Reformat code is not working with the same way as Code->Reformat Code – IDEs Support (IntelliJ Platform) | JetBrains
April 29, 2020 - code when i run Code->Reformat Code from the Intelij: super.onCreate(savedInstanceState); BehaviorSubject<String> progressSubject = BehaviorSubject.create(); Disposable disposal = myTimelineProgressSubject.observeOn(AndroidSchedulers.mainThread()).subscribe(s -> rxProgressUpdate(s)); ... Thanks for the fast reply. It worked perfect!
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 20888663317906-Reformatting-doesn-t-follow-code-style
Reformatting doesn't follow code style – IDEs Support (IntelliJ Platform) | JetBrains
August 21, 2024 - I'm working on a react-native project. I've changed some of the settings under Editor > Code Style > [both Javascript and Typescript]. I've first set these rules for Scheme: Default and then clicked “Copy to Project…”. When I Reformat Code, it doesn't follow the rules that I've set.
🌐
Stack Overflow
stackoverflow.com › questions › 48234898 › intellij-idea-code-reformat-not-working
java - IntelliJ IDEA code reformat not working - Stack Overflow
Could you please share your checkstyle scheme? May be not all settings are supported by IDEA formatter. ... If you install Save Actions plugin and configure it to reformat on save then it'll automatically format for you
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 206322249-code-reformat-not-working-in-blade-or-html
code reformat not working in blade or html – IDEs Support (IntelliJ Platform) | JetBrains
September 19, 2014 - For PhpStorm v8 -- "Preferences | Editor | Show "Reformat Code" dialog" -- make sure it's enabled. For PhpStorm v9 -- Reformat does not show such dialog anymore as it always context dependant.
🌐
CodingTechRoom
codingtechroom.com › question › https-example-com-intellij-idea-code-reformat-not-working
Why Isn’t Code Reformatting Working in IntelliJ IDEA? - CodingTechRoom
The reformat shortcut may not be properly set or may be conflicting with another action. Check your code style settings by navigating to 'File' > 'Settings' > 'Editor' > 'Code Style' and ensure the correct language is selected. Right-click on the editor window and select 'Reformat Code' to ...
🌐
GitHub
github.com › dubreuia › intellij-plugin-save-actions › issues › 230
Reformatting only changed code does not work in 1.4 and latest Intellij · Issue #230 · dubreuia/intellij-plugin-save-actions
March 11, 2019 - Describe the bug #217 mentions reformatting only changed code option should work. However, it doesn't. In latest version of intellij it still modifies the entire file. To Reproduce Open an existing file with VCS enabled (e.g. git) that r...
Author: dubreuia
🌐
GitHub
github.com › google › google-java-format › issues › 795
Formatting does nothing on IntelliJ IDEA 2022.2 EAP · Issue #795 · google/google-java-format
June 21, 2022 - This is with build number 222.2964.55 of the IDE. google java format enabled for the project; reformatting does not change anything, claiming "No lines changed: content is already properly for...
Author: google
🌐
GitHub
github.com › detekt › detekt-intellij-plugin › issues › 511
IntelliJ reformatting code not as expected · Issue #511 · detekt/detekt-intellij-plugin
April 8, 2024 - Detekt's reformatting function works as intended. When I use the IDE's Reformat code, it doesn't align with what Detekt is configured. Reformat code should reformat code as would Detekt. I'm not sure if this has ever worked before or I just happened to have the right IDE configs to make it look like Reformat code works as expected, but this happened recently when I reopened an old Kotlin project.
Author: detekt
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 206190669-Java-code-formatting-not-working-properly
Java code formatting not working properly – IDEs Support (IntelliJ Platform) | JetBrains
February 19, 2014 - You can disable them in Settings|Code Style|General|Formatter Control by unchecking "Enable formatter markers in comments". I'm not sure it has anything to do with spaces problem but you can give it a try.