Prevent auto formatting after compilation in Studio.
Hi,
I would like to ask whether there is some option to stop auto-formatting when I compile. The code is sometimes well formatted but the auto-formatter does not work correctly in some situations. I am talking about the compilation in the Studio editor in this image, not about Visual Studio Code.
.png)
Thank you in advance,
Alin C Soare.
Comments
@Alin Soare
What "auto-formatting" are you referring to? Can you provide before and after screenshots showing what gets changed on save?
.png)
.png)
In this example it does nothing bad but I do not like it to remove or insert spaces.
Can I prevent it from auto formatting as it wants ?
@Alin.SoareYou can't prevent that. The actual text of the class isn't stored in the database. During a save, it gets converted to a global that gets stored in the database, and then converted back into text. The class's text is always regenerated in "canonical" form, with excess spaces removed, capitalization normalized etc. This process doesn't affect method/query implementation code though, it's purely cosmetic.
Could you please describe the situations where it does something "bad" or where you see things as not working correctly?
When the code is mixed with comments it works very bad.
Could you please provide an example with screenshots?