1

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?

SLN
  • 4,772
  • 2
  • 38
  • 79

1 Answers1

2

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.

Vikas Suryawanshi
  • 522
  • 1
  • 5
  • 12
  • do you know how can I create a map key for google-java-format plugin in Intellij IDEA? I didn't found any predefined mapping key for that plugin. – SLN Mar 04 '19 at 13:09
  • i dont know what exactly you are trying to do but find the below link may help you.. https://gerrit-review.googlesource.com/Documentation/dev-intellij.html – Vikas Suryawanshi Mar 05 '19 at 05:21
  • in the above link look for the section google-java-format plugin – Vikas Suryawanshi Mar 05 '19 at 05:22