Files
oxc/apps
leaysgur f9a502c54d feat(oxfmt): oxfmt --lsp support (#15765)
Support `--lsp`, fixes #15739

- Implementation still lives in `oxc_language_server`
  - The same as `oxlint --lsp`
  - But now we can remove `oxc_language_server`'s `bin`
- For Rust CLI, `.await` with `tokio`
- For JS CLI, `napi-rs` automatically wraps with `tokio`

---

Now I'm seeing 2 problems:

- For JS CLI, `node ./dist/cli.js --lsp` does not work
  - Instead of waiting LSP message, just panics with error
  - `{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error"},"id":null}`
  - `import process2 from "process";` in bundled file makes this happen, but I don't know why
  - 👉🏻 Fixed by import `prettier` lazily...
- `oxc_linter` is also bundled with `oxfmt`
  - via `oxc_language_server`
  - 👉🏻 #15767
2025-11-17 13:35:24 +00:00
..