Context
Problem had shape before code did.
After one local installation in Remix, the plugin watches the file manager's save event. It checks the selected extension, reads the file through Remix permissions, formats it locally, and writes it back only when the result differs. Solidity gets native Prettier formatting. Other supported smart-contract languages receive safe whitespace and indentation normalisation without the formatter changing unknown files.
- Designed a local-first release path: GitHub Releases provide versioned ZIP bundles instead of a hosted formatter. The bundle starts a loopback-only server on 127.0.0.1 for Remix Desktop.
- Connected Remix's `fileSaved` event to a debounced formatting queue, so users save normally instead of reopening the side panel for every document.
- Used Prettier with the Solidity parser for `.sol` files and kept non-native language formatters structural and token-preserving rather than pretending every language has a full parser.
- Added a stateful plugin surface: connection health, current-file detection, engine badge, persisted style preferences, formatted-file count, and Remix status feedback.
- Host
- Remix iframe plugin using the File Manager API and host permission model.
- Distribution
- GitHub Releases ZIP; users run a local 127.0.0.1 server and add it once to Remix.
- Formatting guarantee
- Native Prettier for Solidity; safe structural formatting for other declared extensions; unsupported files untouched.