Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop intellij from converting my code?

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
like image 383
Luis Liz Avatar asked Apr 17 '19 01:04

Luis Liz


People also ask

How to stop IntelliJ from Auto format Code?

In Preferences > Editor > Code style > [language] uncheck reformat on file save .

How to turn off suggestions in IntelliJ?

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.

How do I recompile with details in IntelliJ?

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'.


1 Answers

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.

like image 60
craigpastro Avatar answered Sep 29 '22 02:09

craigpastro