Files
pi-lsp/server.ts
2026-04-25 21:06:15 -04:00

34 lines
973 B
TypeScript

// Server Registry - Maps a language id (or file extension) to an LSP server
// launcher plus the root markers that identify a project boundary.
//
// Add new servers here. `match` is a list of file extensions (no dot) OR
// language ids; either matches.
import type { ServerConfig } from "./src/types.ts";
export const servers: ServerConfig[] = [
{
id: "gopls",
match: ["go"],
command: "gopls",
args: ["-remote=auto"],
rootMarkers: ["go.work", "go.mod"],
languageId: "go",
},
{
id: "typescript-language-server",
match: ["ts", "tsx", "js", "jsx", "mts", "cts"],
command: "typescript-language-server",
args: ["--stdio"],
rootMarkers: ["pnpm-workspace.yaml", "tsconfig.json", "package.json"],
languageId: "typescript",
},
{
id: "pyright",
match: ["py"],
command: "pyright-langserver",
args: ["--stdio"],
rootMarkers: ["pyproject.toml", "setup.py", "setup.cfg"],
languageId: "python",
},
];