Summary
Implement textDocument/onTypeFormatting to auto-format the current line when the user types ; or END_*.
Scope
- Trigger characters:
;, _ (catches END_IF, END_FOR, etc.)
- Formats indentation of the current line only
- Respects user formatting options (tab size, insert spaces)
- Registered in LSP server capabilities
Implementation Notes
- Add
onTypeFormattingProvider to LSP capabilities in server.ts
- Reuse indentation logic from
FormattingProvider
Acceptance
- Typing
; corrects indentation of current statement
- Typing END_IF / END_FOR / END_WHILE normalizes indent
- No formatting when triggered in comments or strings
- Tests pass
Summary
Implement
textDocument/onTypeFormattingto auto-format the current line when the user types;orEND_*.Scope
;,_(catches END_IF, END_FOR, etc.)Implementation Notes
onTypeFormattingProviderto LSP capabilities inserver.tsFormattingProviderAcceptance
;corrects indentation of current statement