vscode-motoko icon indicating copy to clipboard operation
vscode-motoko copied to clipboard

Move formatter from extension to language server

Open wiyota opened this issue 1 month ago • 0 comments

Summary

  • Move document formatting logic from extension client to language server
  • Delete src/formatter.ts and create src/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 .prettierignore files 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.

wiyota avatar Nov 09 '25 04:11 wiyota