Replies: 2 comments 6 replies
-
For now, it'd be best if our code copied the default formatting of SciTE4AutoHotkey, as I suspect that's the most popular formatter in current use. I'm no expert here, and official docs may be better, but it's hard to know exactly what formatting logic they use. As I continue work on #123, I hope to create a highly-configurable formatter that allows users to choose basically any setting they want. Regarding 1st, I think this should be a toggle. I don't want to change default formatting behavior (unless it's a bugfix) until version 3.0.0, which will close #123. I don't consider 1st to be a bug, as this is a valuable behavior to know what code is under what if block (and easily collapse it) 2nd and 3rd both make sense, and the fixes should be new settings like you've suggested :) You're more than welcome to create three issues for this and open pull requests for the proposed solutions. Thank you again for your contributions! |
Beta Was this translation helpful? Give feedback.
-
@mark-wiemer Is this a common style for if var1 {
code
} if var2 {
code
} Relative to #261 PR. It will simplify code, if formatter will not support. |
Beta Was this translation helpful? Give feedback.
-
What concern me:
#If...
1st is bad: if user write only one
#If...
at top of the script, all below code will be indented. With this behavior formatter pushes user to use close#If
command, but it not required by official documentation. I propose remove this indent.2nd is very good, but breaks compatibly with other IDE (for example
AHK Studio
, it makes code like in official doc). I propose (and will do if we both agree) add settingDisable indent inside labels
to extension's settings.3rd is definitely must be configurable, for example
Keep indent of empty lines
setting.Notifying @mark-wiemer
Beta Was this translation helpful? Give feedback.
All reactions