refactor: improve code readability and consistency across multiple files

This commit is contained in:
asepharyana
2026-07-20 12:02:50 +07:00
parent 4ced6681c2
commit 1ec2aa136a
17 changed files with 117 additions and 41 deletions
+10 -1
View File
@@ -19,6 +19,15 @@ impl LspManager {
clients: HashMap::new(),
}
}
}
impl Default for LspManager {
fn default() -> Self {
Self::new()
}
}
impl LspManager {
pub fn start(&mut self, language: &str, command: &str, args: &[String]) -> anyhow::Result<()> {
let client = LspClient::start(command, args)?;
@@ -31,7 +40,7 @@ impl LspManager {
}
pub fn shutdown_all(&mut self) {
for (_lang, client) in &self.clients {
for client in self.clients.values() {
let _ = client.shutdown();
}
self.clients.clear();