I'm using scala and every time I paste my code it changes the format. I reset the settings but it keeps doing it. I can't find the setting I tried to disable in Smart Keys but still.
What I want to paste
addItem: "food", "arroz", "arroz.jpg", 300, 1.50;
What gets pasted
addItem //todo: labels is not supported
"food"
"arroz"
"arroz.jpg"
300
1.50
In Preferences > Editor > Code style > [language] uncheck reformat on file save .
In the Settings/Preferences dialog ( Ctrl+Alt+S ), select to Editor | Inspections. You can also press Ctrl+Alt+Shift+H and select Configure Inspections. Locate the disabled inspection in the list and select the checkbox next to it.
Open the needed file in the editor and from the main menu, select Build | Recompile 'class name' ( Ctrl+Shift+F9 ). Alternatively, in the Project tool window, right-click the class you need and from the context menu, select Recompile 'class name'.
That doesn't happen to me, but maybe you have "Convert Java code to Scala on copy-paste" and under that "Don't show dialog on paste and automatically convert to Scala code" selected.
Check it out under Preferences -> Languages & Frameworks -> Scala -> Editor
. This is for Mac, but I assume it is something similar if you are using something else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With