-
-
Notifications
You must be signed in to change notification settings - Fork 707
feat(language_server): watch for fmt.configPath file content change
#14509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(language_server): watch for fmt.configPath file content change
#14509
Conversation
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
There was a problem hiding this 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.
049aef7 to
be35392
Compare
There was a problem hiding this 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.
be35392 to
9a2df8d
Compare
9a2df8d to
426f7e5
Compare
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

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