fix(lsp): improve error messages when LSP server is not installed (#305)

Previously, when an LSP server was configured but not installed, the error
message said "No LSP server configured" which was misleading. Now the
error message distinguishes between:

1. Server not configured at all
2. Server configured but not installed (with installation hints)

The new error messages include:
- Clear indication of whether server is configured vs installed
- Installation commands for each built-in server
- Supported file extensions
- Configuration examples for custom servers

Fixes #304

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
This commit is contained in:
Sisyphus
2025-12-28 17:38:23 +09:00
committed by GitHub
parent 4d4273603a
commit 4d66ea9730
5 changed files with 126 additions and 23 deletions
+1 -2
View File
@@ -1,9 +1,8 @@
import { spawn, type Subprocess } from "bun"
import { readFileSync } from "fs"
import { extname, resolve } from "path"
import type { ResolvedServer } from "./config"
import { getLanguageId } from "./config"
import type { Diagnostic } from "./types"
import type { Diagnostic, ResolvedServer } from "./types"
interface ManagedClient {
client: LSPClient