vscode-motoko
vscode-motoko copied to clipboard
Move formatter from extension to language server
Summary
- Move document formatting logic from extension client to language server
- Delete
src/formatter.tsand createsrc/server/formatter.ts - Add formatter configuration via initialization options
- Remove client-side formatting provider registration
- Update documentation to reflect formatter is now handled by language server
- Add comprehensive formatter tests with default prettier and disabled options
- Support workspace folder resolution and
.prettierignorefiles in server - Apply VS Code formatting options (
tabSize,insertSpaces) to prettier
This change improves the architecture by centralizing formatting logic within the language server. As a result, formatting via the language server is now applied by default even in editors other than VS Code, and configuration (prettier or none) via initialization options is also possible.