refactor(oxfmt/lsp): move lsp code to apps/oxfmt, remove lsp formatter feature flag#17462
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Performance ReportMerging #17462 will not alter performanceComparing Summary
Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the LSP formatter code by moving it from crates/oxc_language_server to apps/oxfmt, removing the formatter feature flag from the language server crate.
Key Changes:
- Moves formatter LSP implementation from
oxc_language_servertoapps/oxfmt/src/lsp - Removes the
formatterfeature flag and associated dependencies fromoxc_language_server - Migrates test fixtures and snapshots to
apps/oxfmt/test/fixtures/lsp/
Reviewed changes
Copilot reviewed 13 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
crates/oxc_language_server/src/main.rs |
Removes formatter builder registration (previously behind feature flag) |
crates/oxc_language_server/src/lib.rs |
Removes formatter module, exports Capabilities and makes utils public for external use |
crates/oxc_language_server/src/formatter/mod.rs |
Deleted - entire formatter module removed |
crates/oxc_language_server/Cargo.toml |
Removes formatter feature and related dependencies (oxc_formatter, oxc_parser, json-strip-comments) |
apps/oxfmt/src/lsp/mod.rs |
New LSP module entry point with run_lsp() function and formatter constants |
apps/oxfmt/src/lsp/server_formatter.rs |
Formatter LSP implementation moved from oxc_language_server with updated imports |
apps/oxfmt/src/lsp/options.rs |
New file containing formatter options configuration |
apps/oxfmt/src/lsp/tester.rs |
Test utilities with updated import paths |
apps/oxfmt/test/fixtures/lsp/* |
New test fixtures for LSP functionality (basic, root_config, custom_config_path, ignore-file, ignore-pattern) |
apps/oxfmt/src/lsp/snapshots/* |
Updated test snapshots with corrected source paths and file locations |
apps/oxfmt/Cargo.toml |
Adds necessary dependencies (oxc_data_structures, log, serde, tower-lsp-server, insta) and removes formatter feature from oxc_language_server dependency |
Cargo.lock |
Reflects dependency changes across both crates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1086338 to
d404ffa
Compare
Merge activity
|
d404ffa to
7e4f449
Compare
7e4f449 to
435e955
Compare

This is now possible, because
oxc_language_serveris not anymore shipped #17457