MCPcopy Create free account
hub / github.com/Glyphack/enderpy / initialize

Method initialize

lsp/src/main.rs:26–43  ·  view source on GitHub ↗
(&self, i: InitializeParams)

Source from the content-addressed store, hash-verified

24#[tower_lsp::async_trait]
25impl LanguageServer for Backend {
26 async fn initialize(&self, i: InitializeParams) -> Result<InitializeResult> {
27 let root = match i.root_uri {
28 Some(v) => v.to_file_path().unwrap_or(PathBuf::from("")),
29 None => PathBuf::from(""),
30 };
31 self.manager.build(&root);
32 Ok(InitializeResult {
33 server_info: None,
34 offset_encoding: None,
35 capabilities: ServerCapabilities {
36 text_document_sync: Some(TextDocumentSyncCapability::Kind(
37 TextDocumentSyncKind::FULL,
38 )),
39 hover_provider: Some(HoverProviderCapability::Simple(true)),
40 ..ServerCapabilities::default()
41 },
42 })
43 }
44
45 async fn initialized(&self, _: InitializedParams) {
46 log::info!("server initialized!");

Callers

nothing calls this directly

Calls 2

KindEnum · 0.85
buildMethod · 0.45

Tested by

no test coverage detected