Initializes the manager (loads installed plugins).
(&self)
| 39 | |
| 40 | /// Initializes the manager (loads installed plugins). |
| 41 | pub async fn initialize(&self) -> Result<()> { |
| 42 | info!("Initializing LSP Manager"); |
| 43 | |
| 44 | if let Err(e) = self.plugin_loader.cleanup_temp_dirs().await { |
| 45 | warn!("Failed to cleanup temp directories: {}", e); |
| 46 | } |
| 47 | |
| 48 | let plugins = self.plugin_loader.load_all_plugins().await?; |
| 49 | |
| 50 | for plugin in plugins { |
| 51 | if let Err(e) = self.register_plugin_internal(plugin).await { |
| 52 | error!("Failed to register plugin: {}", e); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | let count = { |
| 57 | let registry = self.registry.read().await; |
| 58 | registry.count() |
| 59 | }; |
| 60 | |
| 61 | info!("LSP Manager initialized with {} plugin(s)", count); |
| 62 | |
| 63 | Ok(()) |
| 64 | } |
| 65 | |
| 66 | // Note: workspace root path management has been moved to WorkspaceLspManager. |
| 67 | // LspManager is responsible for protocol-layer operations only. |
no test coverage detected