SLN
SLN

Reputation: 5082

How Can I make sure I applied the correct code format in intelliJ

I have both Java and Scale code in the project. Editing 2 types of code in one task is common. I inputted the google-java-code-style schema for Java code format and installed the scalafmt plugin in the intellij IDEA.

Both of them use Ctrl+Shift+L to reformat the code. How can I make sure the correct one has been called when I press those hot keys. I feel all the code were formatted by the google-java-code-style schema for the moment.

Is there any indicators could inform me which schema or plugin is triggered for the reformatting?

Upvotes: 1

Views: 131

Answers (1)

Vikas Suryawanshi
Vikas Suryawanshi

Reputation: 522

You can change the shortcuts from..

  1. From the main menu, choose File | Settings on Windows and Linux or JetBrains Rider | Preferences on macOS, then choose Keymap on the left.

  2. Select one of the pre-configured Keymaps, which you want to use as the base for the new one, and click Copy. Accept the default name, or change it as required.

Upvotes: 2

Related Questions