Reputation:
I have reinstalled the last version of IntelliJ IDEA and then when I try to format an SQL file, it orders all the lines as shown on the image.
However, I have not made any settings for SQL formatting in the previous versions and the format was OK as shown on my current setting preview as shown below:
So, is there anything default to format SQL properly? There are lots of choices in the settings, but I just want to use a default one available on the settings (I tried but it format almost the same).
Upvotes: 6
Views: 3579
Reputation: 21
For me, it works to disable the 'Line breaks' option in the 'Wrapping' tab
Upvotes: 1
Reputation: 6876
I faced the same issue. Settings/Languages&Frameworks/SQL Dialects, there you can find the dialect of the file. Change it to what you use.
That's how I solved the problem, even though you apply global or project SQL Dialect, the file may not be updated.
As you can see from the image, Generic SQL
causes the problem.
Upvotes: 9