feat(language_server): watch for fmt.configPath file content change#14509
Merged
graphite-app[bot] merged 1 commit intomainfrom Oct 17, 2025
Conversation
Member
Author
66dea12 to
d1e5d3f
Compare
92dfad4 to
cc10d7b
Compare
d1e5d3f to
5af31a3
Compare
5af31a3 to
04778ce
Compare
cc10d7b to
f977700
Compare
04778ce to
a09d9f7
Compare
a09d9f7 to
2b7ab22
Compare
2b7ab22 to
a797a9e
Compare
545e9db to
33b6cde
Compare
7d5760b to
049aef7
Compare
Contributor
There was a problem hiding this comment.
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.
049aef7 to
be35392
Compare
Contributor
There was a problem hiding this comment.
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.
be35392 to
9a2df8d
Compare
9a2df8d to
426f7e5
Compare
camc314
approved these changes
Oct 17, 2025
Contributor
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
426f7e5 to
2609c74
Compare
This was referenced Oct 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The server now sends a request to the client, to watch for
.oxfmtrc.jsonor custom configurablefmt.configPathfile content changes.The client will send a
workspace/didChangeWatchedFilesnotification 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