You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may be a very niche situation / edge case due to a way that I have found you can create object literals in a relatively compact but easily readable form (coming from a javascript/JSON background, comma-placement notwithstanding), in which case feel free to wontfix. But I'll describe it anyway...
On Format Document, the formatter indents the first object correctly (one tab), but after that goes wild with the tabs and double-indents the second object (3 tabs), triple indents the third object (4 tabs). It also pulls the last line of the object back in by one tab, so it's in line with its definition. From the end of the function as exampled below to the end of the file the formatter keeps the 4-tabs as the new left margin! And the one super-indented line "useToast" isn't a typo, it does get pushed in one more tab.
Hey @Cirieno , thanks for opening this bug. Are you able to provide a slightly smaller object with values like foo and bar so that we can more easily debug the problem? It's pretty clear, but a short 5-10 line snippet would work wonders to make sure we're all on the same page :)
## 3.1.0 - 2022-11-21 🦃
Compiler:
- New compiler options in settings: Choose base file, file icon, and "use [MPRESS](https://www.autohotkey.com/mpress/mpress_web.htm)"
- Add "Compiler GUI" command in context menu to use the AHK GUI when compiling
Snippets:
- Update snippets for AHK 1.1.35.00 and fix broken `InStr()` snippet ([#263](#263))
Grammar: Fix `#Requires` not being recognized ([#268](#268))
Editor: New AHK file icon (green square with white H)
Debugger: Minor debugger improvements
Formatter: Close the following bugs:
- Formatter incorrectly indents object literals ([#184](#184), [#222](#222))
- Nested one command code flow control ([#255](#255))
Miscellaneous:
- Extension should start up faster
This may be a very niche situation / edge case due to a way that I have found you can create object literals in a relatively compact but easily readable form (coming from a javascript/JSON background, comma-placement notwithstanding), in which case feel free to
wontfix
. But I'll describe it anyway...On
Format Document
, the formatter indents the first object correctly (one tab), but after that goes wild with the tabs and double-indents the second object (3 tabs), triple indents the third object (4 tabs). It also pulls the last line of the object back in by one tab, so it's in line with its definition. From the end of the function as exampled below to the end of the file the formatter keeps the 4-tabs as the new left margin! And the one super-indented line "useToast" isn't a typo, it does get pushed in one more tab.Unformatted code
Expected formatted output
Actual formatted output
The text was updated successfully, but these errors were encountered: