Automatic configuration reloading for ruff server (#10404)

## Summary

Fixes #10366.

`ruff server` now registers a file watcher on the client side using the
LSP protocol, and listen for events on configuration files. On such an
event, it reloads the configuration in the 'nearest' workspace to the
file that was changed.

## Test Plan

N/A
This commit is contained in:
Jane Lewis 2024-03-21 13:17:07 -07:00 committed by GitHub
parent 5062572aca
commit 4f06d59ff6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 131 additions and 13 deletions

View file

@ -65,6 +65,9 @@ pub(super) fn notification<'a>(notif: server::Notification) -> Task<'a> {
notification::DidChangeConfiguration::METHOD => {
local_notification_task::<notification::DidChangeConfiguration>(notif)
}
notification::DidChangeWatchedFiles::METHOD => {
local_notification_task::<notification::DidChangeWatchedFiles>(notif)
}
notification::DidChangeWorkspace::METHOD => {
local_notification_task::<notification::DidChangeWorkspace>(notif)
}