⌥+↩︎ Basic code completion (complete any class, method, variable)
Such an easy-to-use shortcut key sometimes fails when it fails. The reason for the failure is generally because we have done an operation similar to this. As shown below:
The solution is:
Step 1: Go to Settings->Keymap->Search: show Context Actions This shortcut key. If the default keys are correct. Then look down.
Step 2: Click: Editor->intention->refactorings. Check the Introduce local variable option. Then click Apply, and then click the Ok option. After that, you can use the ⌥+↩︎ shortcut key normally.