pub struct LspWatcher { /* private fields */ }Expand description
Watcher for LSP server availability and configuration changes
This watcher monitors:
- LSP server availability changes (server starts/stops)
- Configuration file changes (new LSP servers added/removed)
- Provider registry updates
Implementations§
Source§impl LspWatcher
impl LspWatcher
Sourcepub fn new(registry: Arc<LspProviderRegistry>) -> Self
pub fn new(registry: Arc<LspProviderRegistry>) -> Self
Create a new LSP watcher
Sourcepub fn with_interval(
registry: Arc<LspProviderRegistry>,
interval: Duration,
) -> Self
pub fn with_interval( registry: Arc<LspProviderRegistry>, interval: Duration, ) -> Self
Create a new LSP watcher with custom check interval
Sourcepub async fn start(&self) -> Result<()>
pub async fn start(&self) -> Result<()>
Start watching for changes
This spawns a background task that periodically checks for:
- LSP server availability changes
- Configuration file changes
Sourcepub fn is_running(&self) -> Result<bool>
pub fn is_running(&self) -> Result<bool>
Check if the watcher is running
Sourcepub async fn check_availability(&self) -> Result<()>
pub async fn check_availability(&self) -> Result<()>
Manually check for LSP server availability changes
This is called periodically by the watcher task
Sourcepub async fn check_configuration(&self) -> Result<()>
pub async fn check_configuration(&self) -> Result<()>
Manually check for configuration changes
This is called periodically by the watcher task
Auto Trait Implementations§
impl Freeze for LspWatcher
impl RefUnwindSafe for LspWatcher
impl Send for LspWatcher
impl Sync for LspWatcher
impl Unpin for LspWatcher
impl UnwindSafe for LspWatcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more