MCPcopy Create free account
hub / github.com/GCWing/BitFun / initialize

Method initialize

src/crates/services/services-core/src/lsp/manager.rs:41–64  ·  view source on GitHub ↗

Initializes the manager (loads installed plugins).

(&self)

Source from the content-addressed store, hash-verified

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.

Callers 1

start_serverMethod · 0.45

Calls 5

cleanup_temp_dirsMethod · 0.80
load_all_pluginsMethod · 0.80
readMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected