Configuration

lspmesh discovers an optional lspmesh.json by walking up from the working directory. When none is found it uses a built-in default that wires TypeScript, Tailwind, and Biome via npx with pinned versions, so a fresh install needs no global binaries.

lspmesh.json

{
  "backends": [
    {
      "name": "typescript",
      "command": "npx",
      "args": ["-y", "typescript-language-server@4.4.1", "--stdio"],
      "extensionToLanguage": {
        ".ts": "typescript",
        ".tsx": "typescriptreact"
      }
    }
  ]
}

Backend fields

  • name — unique id for the backend.
  • command / args — how to launch it; it must speak LSP over stdio.
  • extensionToLanguage — maps a file extension to the LSP languageId. A request is routed to every backend whose map contains the document's extension, and the responses are merged.
  • cwd (optional) — working directory for the child; defaults to the mesh root.
  • env (optional) — extra environment for the child.

Adding a backend

Append an entry with the launcher and the extensions it should serve. For example, a language server keyed on .rs would receive every .rs request and contribute its results to the merged response — no code changes required.

Notes

  • workspace/symbol is seeded with a git grep for the queried name, opening the definition-likely files so a lazily-loaded TypeScript project indexes before the query, then polled until results arrive.
  • A backend that fails to start is logged to stderr and skipped; the rest keep serving.

On this page