Skip to content

refactor(oxfmt/lsp): move lsp code to apps/oxfmt, remove lsp formatter feature flag#17462

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-29-refactor_oxfmt_lsp_move_lsp_code_to_apps_oxfmt_remove_lsp_formatter_feature_flag
Dec 30, 2025
Merged

refactor(oxfmt/lsp): move lsp code to apps/oxfmt, remove lsp formatter feature flag#17462
graphite-app[bot] merged 1 commit intomainfrom
12-29-refactor_oxfmt_lsp_move_lsp_code_to_apps_oxfmt_remove_lsp_formatter_feature_flag

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Dec 29, 2025

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.

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

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-editor Area - Editor and Language Server A-formatter Area - Formatter labels Dec 29, 2025
Copy link
Member Author

Sysix commented Dec 29, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Dec 29, 2025
@Sysix Sysix removed the A-linter Area - Linter label Dec 29, 2025
@Sysix Sysix requested a review from Copilot December 29, 2025 18:00
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 29, 2025

CodSpeed Performance Report

Merging #17462 will not alter performance

Comparing 12-29-refactor_oxfmt_lsp_move_lsp_code_to_apps_oxfmt_remove_lsp_formatter_feature_flag (d404ffa) with main (797c4bb)1

Summary

✅ 42 untouched
⏩ 3 skipped2

Footnotes

  1. No successful run was found on main (ef619a2) during the generation of this report, so 797c4bb was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_server to apps/oxfmt/src/lsp
  • Removes the formatter feature flag and associated dependencies from oxc_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.

@Sysix Sysix force-pushed the 12-29-refactor_oxfmt_lsp_move_lsp_code_to_apps_oxfmt_remove_lsp_formatter_feature_flag branch from 1086338 to d404ffa Compare December 29, 2025 18:44
@Sysix Sysix marked this pull request as ready for review December 29, 2025 18:49
@Sysix Sysix requested a review from camc314 as a code owner December 29, 2025 18:49
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Dec 30, 2025
Copy link
Member

Boshen commented Dec 30, 2025

Merge activity

graphite-app bot pushed a commit that referenced this pull request Dec 30, 2025
…ter feature flag (#17462)

> 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.

This is now possible, because `oxc_language_server` is not anymore shipped #17457
@graphite-app graphite-app bot force-pushed the 12-29-refactor_oxfmt_lsp_move_lsp_code_to_apps_oxfmt_remove_lsp_formatter_feature_flag branch from d404ffa to 7e4f449 Compare December 30, 2025 02:18
…ter feature flag (#17462)

> 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.

This is now possible, because `oxc_language_server` is not anymore shipped #17457
@graphite-app graphite-app bot force-pushed the 12-29-refactor_oxfmt_lsp_move_lsp_code_to_apps_oxfmt_remove_lsp_formatter_feature_flag branch from 7e4f449 to 435e955 Compare December 30, 2025 02:23
@graphite-app graphite-app bot merged commit 435e955 into main Dec 30, 2025
22 checks passed
@graphite-app graphite-app bot deleted the 12-29-refactor_oxfmt_lsp_move_lsp_code_to_apps_oxfmt_remove_lsp_formatter_feature_flag branch December 30, 2025 02:29
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-editor Area - Editor and Language Server A-formatter Area - Formatter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants