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
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
The VS Code extension provides an on-type formatter that triggers on : which allows for block formatting. For example, you can hit colon after the else in the following code:
ifx:
passelse
Which will then be reformatted into:
ifx:
passelse:
This functionality should be implemented in language server for feature parity. The language server may even be able to handle more cases correctly than the extension's use of regex, since we have access to an AST.
Since on-type formatting has only one entrypoint (DocumentOnTypeFormatting), that function would need to map trigger characters to the right handler. A nicety would be to have a Dictionary of handlers, then produce the DocumentOnTypeFormattingOptions's trigger character members from that dictionary rather than needing to remember to change the characters in two different files.
Activity
Turn off on type formatting until #165 is done.
MikhailArkhipov commentedon Oct 8, 2018
Also these
microsoft/vscode-python#481
microsoft/vscode-python#684
Enable on-type formatting from language server (#2737)
Turn off on type formatting until microsoft#165 is done.