Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Oct 11, 2025

The server now sends a request to the client, to watch for .oxfmtrc.json or custom configurable fmt.configPath file content changes.
The client will send a workspace/didChangeWatchedFiles notification to the server.

The client can also send workspace/didChangeConfiguration, for now the server will restart both tools.
This will be optimized by looking at which tool is responsible for the file in #14645

@github-actions github-actions bot added A-editor Area - Editor and Language Server C-enhancement Category - New feature or request labels Oct 11, 2025
Copy link
Member Author

Sysix commented Oct 11, 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 changed the base branch from 10-11-feat_language_server_support_fmt.configpath_configuration to graphite-base/14509 October 11, 2025 17:25
@Sysix Sysix force-pushed the 10-11-feat_language_server_watch_for_fmt.configpath_file_content_change branch from 66dea12 to d1e5d3f Compare October 11, 2025 17:25
@Sysix Sysix changed the base branch from graphite-base/14509 to 10-11-refactor_language_server_pass_lintoptions_to_worker_refresh_server_linter_ October 11, 2025 17:25
@Sysix Sysix force-pushed the 10-11-refactor_language_server_pass_lintoptions_to_worker_refresh_server_linter_ branch from 92dfad4 to cc10d7b Compare October 11, 2025 22:36
@Sysix Sysix force-pushed the 10-11-feat_language_server_watch_for_fmt.configpath_file_content_change branch from d1e5d3f to 5af31a3 Compare October 11, 2025 22:36
@graphite-app graphite-app bot changed the base branch from 10-11-refactor_language_server_pass_lintoptions_to_worker_refresh_server_linter_ to graphite-base/14509 October 12, 2025 10:18
@graphite-app graphite-app bot force-pushed the 10-11-feat_language_server_watch_for_fmt.configpath_file_content_change branch from 5af31a3 to 04778ce Compare October 12, 2025 10:22
@graphite-app graphite-app bot force-pushed the graphite-base/14509 branch from cc10d7b to f977700 Compare October 12, 2025 10:22
@graphite-app graphite-app bot changed the base branch from graphite-base/14509 to main October 12, 2025 10:22
@graphite-app graphite-app bot force-pushed the 10-11-feat_language_server_watch_for_fmt.configpath_file_content_change branch from 04778ce to a09d9f7 Compare October 12, 2025 10:23
@Sysix Sysix changed the base branch from main to graphite-base/14509 October 12, 2025 13:24
@Sysix Sysix force-pushed the 10-11-feat_language_server_watch_for_fmt.configpath_file_content_change branch from a09d9f7 to 2b7ab22 Compare October 12, 2025 13:24
@Sysix Sysix changed the base branch from graphite-base/14509 to 10-12-test_language_server_add_basic_tests_for_workspaceworker_did_change_configuration_ October 12, 2025 13:24
@graphite-app graphite-app bot changed the base branch from 10-12-test_language_server_add_basic_tests_for_workspaceworker_did_change_configuration_ to graphite-base/14509 October 12, 2025 13:37
@Sysix Sysix force-pushed the 10-11-feat_language_server_watch_for_fmt.configpath_file_content_change branch from 2b7ab22 to a797a9e Compare October 12, 2025 13:41
@Sysix Sysix force-pushed the graphite-base/14509 branch from 545e9db to 33b6cde Compare October 12, 2025 13:41
@Sysix Sysix changed the base branch from graphite-base/14509 to main October 12, 2025 13:42
@Sysix Sysix force-pushed the 10-11-feat_language_server_watch_for_fmt.configpath_file_content_change branch 4 times, most recently from 7d5760b to 049aef7 Compare October 15, 2025 18:03
@Sysix Sysix requested a review from Copilot October 15, 2025 19:40
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 adds file watcher support for the formatter configuration file, enabling the language server to detect and respond to changes in the formatter config file (similar to existing linter config watching).

Key changes:

  • Added formatter config file watching when experimental formatter is enabled
  • Refactored watcher management to handle multiple watchers (lint + format configs)
  • Updated return types from single watcher to vector of watchers

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/oxc_language_server/src/worker.rs Added formatter config watcher logic in init_watchers and did_change_configuration; refactored return type to handle multiple watchers; added comprehensive test coverage
crates/oxc_language_server/src/backend.rs Updated variable names and handling to work with vector of watchers instead of single watcher

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Sysix Sysix force-pushed the 10-11-feat_language_server_watch_for_fmt.configpath_file_content_change branch from 049aef7 to be35392 Compare October 15, 2025 20:10
@Sysix Sysix requested a review from Copilot October 15, 2025 20:58
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Sysix Sysix force-pushed the 10-11-feat_language_server_watch_for_fmt.configpath_file_content_change branch from be35392 to 9a2df8d Compare October 15, 2025 21:36
@Sysix Sysix force-pushed the 10-11-feat_language_server_watch_for_fmt.configpath_file_content_change branch from 9a2df8d to 426f7e5 Compare October 16, 2025 18:30
@Sysix Sysix marked this pull request as ready for review October 16, 2025 19:55
@Sysix Sysix requested a review from camc314 as a code owner October 16, 2025 19:55
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Oct 17, 2025
@camc314 camc314 self-assigned this Oct 17, 2025
Copy link
Contributor

camc314 commented Oct 17, 2025

Merge activity

…#14509)

The server now sends a request to the client, to watch for `.oxfmtrc.json` or custom configurable `fmt.configPath` file content changes.
The client will send a `workspace/didChangeWatchedFiles` notification to the server.

The client can also send `workspace/didChangeConfiguration`, for now the server will restart both tools.
This will be optimized by looking at which tool is responsible for the file in #14645
@graphite-app graphite-app bot force-pushed the 10-11-feat_language_server_watch_for_fmt.configpath_file_content_change branch from 426f7e5 to 2609c74 Compare October 17, 2025 10:59
@graphite-app graphite-app bot merged commit 2609c74 into main Oct 17, 2025
21 checks passed
@graphite-app graphite-app bot deleted the 10-11-feat_language_server_watch_for_fmt.configpath_file_content_change branch October 17, 2025 11:04
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Oct 17, 2025
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-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants