Reformat Code Help

This has been driving me bonkers. The reformat code option works great in most cases. But I'm having this issue when formatting the following scenarios. In the first scenario, it's indenting the first comment line, and then indenting the whole create statement. I don't want either of these things to happen. Keep in mind, this seems to only happen when it's inside a ‘create procedure’ statement, same with the second scenario. Is there a way to prevent this from happening? I've been trying a lot of formatting options but can't seem to get it to work the way I want it to.

Before formatting:

After formatting: 

Before formatting: 

After formatting:

0
5 comments
HI Kristofer,

May I know what is your current IDE version and your SQL dialect?
0

2024.3, MS SQL Server

0
Thanks for the update.

I couldn't reproduce both formatting issues with the sample structure as per above. If you insert your fragment of code into the template
window to your right-hand side in File | Settings | Editor | Code Style | SQL | General, does it produce the same formatting result?

Please upload your exported scheme settings onto our FTP https://uploads.jetbrains.com/
0

If I paste the following code in there, and go to general, make a change, nothing really changes at all. Maybe I need to compare the settings in general to what I have going on in MS SQL Server, cause when I paste the code in MS SQL Server, MS Azure and make a change so it updates, it's the same as my editor.

upload: 2024_12_05_kQUVX2vZwjt8D35x1Luwpn 

Thanks for your help, Aleksandr.

0
Thanks for the update.

I was able to reproduce this issue and since a similar issue was already reported as fixed, we assume this could be a regression. Please follow this issue to stay updated on the progress:

https://youtrack.jetbrains.com/issue/DBE-22447
0

Please sign in to leave a comment.