{"record":{"id":"883807c39658da23","repo":"Kuberwastaken/claurst","slug":"no-lsp-server-configured-for","errorCode":null,"errorMessage":"No LSP server configured for '{}'","messagePattern":"No LSP server configured for '(.+?)'","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-rust/crates/core/src/lsp.rs","lineNumber":1110,"sourceCode":"            if !self.configs.iter().any(|c| c.name == cfg.name) {\r\n                self.register_server(cfg.clone());\r\n            }\r\n        }\r\n    }\r\n\r\n    /// Get hover information for `file_path` at the given 1-based position.\r\n    pub async fn hover(\r\n        &mut self,\r\n        file_path: &str,\r\n        root_dir: &Path,\r\n        line: u32,\r\n        character: u32,\r\n    ) -> anyhow::Result<Option<String>> {\r\n        let uri = path_to_uri(file_path);\r\n        let server_name = self\r\n            .server_name_for_file(file_path)\r\n            .ok_or_else(|| {\r\n                anyhow::anyhow!(\"No LSP server configured for '{}'\", file_path)\r\n            })?\r\n            .to_string();\r\n        self.ensure_started(file_path, root_dir).await?;\r\n        let client = self\r\n            .clients\r\n            .get(&server_name)\r\n            .ok_or_else(|| anyhow::anyhow!(\"LSP server '{}' not running\", server_name))?;\r\n        client.hover(&uri, line, character).await\r\n    }\r\n\r\n    /// Get definition locations for `file_path` at the given 1-based position.\r\n    pub async fn definition(\r\n        &mut self,\r\n        file_path: &str,\r\n        root_dir: &Path,\r\n        line: u32,\r\n        character: u32,\r\n    ) -> anyhow::Result<Vec<String>> {\r","sourceCodeStart":1092,"sourceCodeEnd":1128,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/core/src/lsp.rs#L1092-L1128","documentation":"Thrown in `LspManager::hover` when `server_name_for_file(file_path)` returns `None` — no registered LSP server config claims the file's language/extension. The manager refuses to start any server because it does not know which one would handle this file.","triggerScenarios":"hover(file_path, root_dir, line, character) called with a file extension (or language id) not covered by any registered LspServerConfig (see register_server / seed_from_config).","commonSituations":"Requesting hover on a file type like .txt, .json, or a new extension the user hasn't configured; LSP servers section missing from settings; language mapping typo in config (e.g. `rs` vs `rust` extensions).","solutions":["Register a server config covering the file's language via seed_from_config / register_server before calling hover.","Check settings so the file's extension is listed in the appropriate server's languages/extensions.","Skip LSP features gracefully for unconfigured file types instead of propagating the error.","Verify server_name_for_file's matching logic against the actual file name/extension."],"exampleFix":"// before: hover on any file, erroring on unconfigured types\nlet hover = manager.hover(path, root, line, col).await?;\n// after: only when a server is configured for the type\nif manager.server_name_for_file(path).is_some() {\n    let hover = manager.hover(path, root, line, col).await?;\n}","handlingStrategy":"validation","validationCode":"// pre-check before hover\nif manager.server_name_for_file(path).is_none() {\n    return Ok(None); // no server configured for this file type\n}","typeGuard":"fn has_lsp_server(manager: &LspManager, path: &str) -> bool {\n    manager.server_name_for_file(path).is_some()\n}","tryCatchPattern":"let hover = manager.hover(path, root, line, col).await\n    .or_else(|e| {\n        if e.to_string().starts_with(\"No LSP server configured\") { Ok(None) } else { Err(e) }\n    })?;","preventionTips":["Seed the manager with all needed server configs at startup (seed_from_config).","Keep the extensions->server mapping in settings in sync with the file types your tool opens.","Return empty/degraded results for unconfigured languages instead of erroring."],"tags":["lsp","configuration","rust"],"backgroundTag":"missing-required-config-field","analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}