|
|
@ -1429,14 +1429,18 @@ impl Document {
|
|
|
|
self.version
|
|
|
|
self.version
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// maintains the order as configured in the language_servers TOML array
|
|
|
|
pub fn language_servers(&self) -> impl Iterator<Item = &helix_lsp::Client> {
|
|
|
|
pub fn language_servers(&self) -> impl Iterator<Item = &helix_lsp::Client> {
|
|
|
|
self.language_servers.values().filter_map(|l| {
|
|
|
|
self.language_config().into_iter().flat_map(move |config| {
|
|
|
|
if l.is_initialized() {
|
|
|
|
config.language_servers.iter().filter_map(move |features| {
|
|
|
|
Some(&**l)
|
|
|
|
let ls = &**self.language_servers.get(&features.name)?;
|
|
|
|
|
|
|
|
if ls.is_initialized() {
|
|
|
|
|
|
|
|
Some(ls)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
None
|
|
|
|
None
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn remove_language_server_by_name(&mut self, name: &str) -> Option<Arc<Client>> {
|
|
|
|
pub fn remove_language_server_by_name(&mut self, name: &str) -> Option<Arc<Client>> {
|
|
|
|