Skip to content

Comments

chore(vscode): second language server connection for oxfmt#15837

Merged
graphite-app[bot] merged 1 commit intomainfrom
11-17-chore_vscode_second_language_server_connection_for_oxfmt_
Dec 5, 2025
Merged

chore(vscode): second language server connection for oxfmt#15837
graphite-app[bot] merged 1 commit intomainfrom
11-17-chore_vscode_second_language_server_connection_for_oxfmt_

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Nov 18, 2025

This PR implements a second language server connection only for oxfmt. Currently, it still uses the shipped oxc_language_server binary for formatting. When defining a custom oxc.path.oxlint (or oxc.path.server), it will start the search process for node_modules/.bin/oxfmt or uses oxc.path.oxfmt.

This should be not a breaking change. When node_modules/.bin/oxfmt should be required for formatting, the ConfigService.useOxcLanguageServerForFormatting must not be modified. I would love to wait for the correct search implementation for .node_modules/.bin/oxlint before breaking the server detection (and probably removing the shipped server too).

Default / with oxfmt installed:

Using the internal language server (once)

with oxc.path.oxlint:

Using the oxlint path server for linting.
Searching for oxfmt inside node_modules/.bin

with oxc.path.fmt:

Using the internal language server for linting.
Using oxc.path.fmt binary

grafik grafik grafik

@github-actions github-actions bot added A-editor Area - Editor and Language Server C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Nov 18, 2025
Copy link
Member Author

Sysix commented Nov 18, 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.

@Sysix Sysix force-pushed the 11-17-refactor_vscode_split_lsp_releated_code_to_linter.ts_ branch from df6d604 to cc0ec55 Compare November 18, 2025 12:13
@Sysix Sysix force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch from 0a8f773 to 99701c2 Compare November 18, 2025 12:13
@graphite-app graphite-app bot force-pushed the 11-17-refactor_vscode_split_lsp_releated_code_to_linter.ts_ branch 2 times, most recently from 56be34f to f7ff45d Compare November 18, 2025 12:26
@graphite-app graphite-app bot force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch from 96a9a86 to d5ec71f Compare November 18, 2025 12:26
@Sysix Sysix force-pushed the 11-17-refactor_vscode_split_lsp_releated_code_to_linter.ts_ branch from f7ff45d to 240f96d Compare November 18, 2025 14:48
@Sysix Sysix force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch from d5ec71f to 1ec9472 Compare November 18, 2025 14:48
@Sysix Sysix force-pushed the 11-17-refactor_vscode_split_lsp_releated_code_to_linter.ts_ branch from 240f96d to e919504 Compare November 18, 2025 15:21
@Sysix Sysix force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch from 1ec9472 to cce5a20 Compare November 18, 2025 15:21
@Sysix Sysix changed the base branch from 11-17-refactor_vscode_split_lsp_releated_code_to_linter.ts_ to graphite-base/15837 November 18, 2025 15:33
@Sysix Sysix force-pushed the graphite-base/15837 branch from e919504 to 784a33c Compare November 18, 2025 16:33
@Sysix Sysix force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch from cce5a20 to 0fa8b4c Compare November 18, 2025 16:33
@Sysix Sysix changed the base branch from graphite-base/15837 to 11-18-refacor_vscode_run_js_language_server_with_node_ November 18, 2025 16:33
@Sysix Sysix changed the base branch from 11-18-refacor_vscode_run_js_language_server_with_node_ to graphite-base/15837 November 19, 2025 17:15
@graphite-app graphite-app bot force-pushed the graphite-base/15837 branch from 784a33c to 0146b4c Compare November 19, 2025 17:25
@graphite-app graphite-app bot force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch from 0fa8b4c to 35a58e9 Compare November 19, 2025 17:25
@graphite-app graphite-app bot changed the base branch from graphite-base/15837 to main November 19, 2025 17:25
@graphite-app graphite-app bot force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch from 35a58e9 to f61e18a Compare November 19, 2025 17:26
@Sysix Sysix changed the base branch from main to graphite-base/15837 November 21, 2025 16:47
@Sysix Sysix force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch from f61e18a to f535ff0 Compare November 21, 2025 16:47
@Sysix Sysix changed the base branch from graphite-base/15837 to 11-21-refactor_vscode_add_lsp_helper_runexecutable_ November 21, 2025 16:47
@Sysix Sysix changed the base branch from 11-21-refactor_vscode_add_lsp_helper_runexecutable_ to graphite-base/15837 November 21, 2025 17:15
@Sysix Sysix force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch 2 times, most recently from 0932a4b to eef3fe2 Compare November 25, 2025 15:39
@Sysix Sysix marked this pull request as ready for review November 25, 2025 15:45
@Sysix Sysix marked this pull request as ready for review November 25, 2025 15:45
@Sysix Sysix force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch from eef3fe2 to ac599cb Compare November 27, 2025 15:46
@Sysix Sysix force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch from ac599cb to 95542bd Compare December 2, 2025 19:10
@camc314 camc314 requested a review from leaysgur December 2, 2025 22:40
@camc314
Copy link
Contributor

camc314 commented Dec 2, 2025

@leaysgur you probably want to review this? If not, I'm happy to

@leaysgur
Copy link
Member

leaysgur commented Dec 2, 2025

@camc314 I left a comment, so I will get back to you. 🙏🏻

@leaysgur leaysgur assigned camc314 and unassigned leaysgur Dec 2, 2025
@Sysix Sysix force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch 3 times, most recently from c623cc6 to df8baeb Compare December 4, 2025 23:16
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 5, 2025
Copy link
Contributor

camc314 commented Dec 5, 2025

Merge activity

This PR implements a second language server connection only for `oxfmt`. Currently, it still uses the shipped `oxc_language_server` binary for formatting. When defining a custom `oxc.path.oxlint` (or `oxc.path.server`), it will start the search process for `node_modules/.bin/oxfmt` or uses `oxc.path.oxfmt`.

This should be **not** a breaking change. When `node_modules/.bin/oxfmt` should be required for formatting, the `ConfigService.useOxcLanguageServerForFormatting` must not be modified. I would love to wait for the correct search implementation for `.node_modules/.bin/oxlint` before breaking the server detection (and probably removing the shipped server too).

### Default / with `oxfmt` installed:
Using the internal language server (once)

### with `oxc.path.oxlint`:
Using the oxlint path server for linting.
Searching for `oxfmt` inside `node_modules/.bin`

### with `oxc.path.fmt`:
Using the internal language server for linting.
Using `oxc.path.fmt` binary

<img width="257" height="233" alt="grafik" src="https://github.com/user-attachments/assets/0776920d-76cd-49cf-9357-fae2ea4a0eb8" />

<img width="193" height="238" alt="grafik" src="https://github.com/user-attachments/assets/c3b2670d-559e-4d0a-96b2-b420e868e1a1" />

<img width="174" height="258" alt="grafik" src="https://github.com/user-attachments/assets/63f9a265-cae9-4971-9c21-86adeacaf35d" />
@graphite-app graphite-app bot force-pushed the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch from df8baeb to 2fcc079 Compare December 5, 2025 15:51
@graphite-app graphite-app bot merged commit 2fcc079 into main Dec 5, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 11-17-chore_vscode_second_language_server_connection_for_oxfmt_ branch December 5, 2025 15:57
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 5, 2025
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…ject#15837)

This PR implements a second language server connection only for `oxfmt`. Currently, it still uses the shipped `oxc_language_server` binary for formatting. When defining a custom `oxc.path.oxlint` (or `oxc.path.server`), it will start the search process for `node_modules/.bin/oxfmt` or uses `oxc.path.oxfmt`.

This should be **not** a breaking change. When `node_modules/.bin/oxfmt` should be required for formatting, the `ConfigService.useOxcLanguageServerForFormatting` must not be modified. I would love to wait for the correct search implementation for `.node_modules/.bin/oxlint` before breaking the server detection (and probably removing the shipped server too).

### Default / with `oxfmt` installed:
Using the internal language server (once)

### with `oxc.path.oxlint`:
Using the oxlint path server for linting.
Searching for `oxfmt` inside `node_modules/.bin`

### with `oxc.path.fmt`:
Using the internal language server for linting.
Using `oxc.path.fmt` binary

<img width="257" height="233" alt="grafik" src="https://github.com/user-attachments/assets/0776920d-76cd-49cf-9357-fae2ea4a0eb8" />

<img width="193" height="238" alt="grafik" src="https://github.com/user-attachments/assets/c3b2670d-559e-4d0a-96b2-b420e868e1a1" />

<img width="174" height="258" alt="grafik" src="https://github.com/user-attachments/assets/63f9a265-cae9-4971-9c21-86adeacaf35d" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server 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.

3 participants