← Writing

Copilot CLI and OpenCode both support native LSP — but the setup is undocumented friction. lspforge wires it up in one command.


Copilot CLI and OpenCode both support native LSP. Most people don’t know this, and fewer have it actually working.

When LSP is wired up correctly, AI completions get dramatically better — full type intelligence, import awareness, cross-file understanding. When it isn’t, you’re giving the AI partial context and wondering why the suggestions miss.

lspforge does the wiring in one command.

The Problem

LSP servers are scattered across incompatible installers:

  • TypeScript LSP → npm
  • Pyright → npm or pip
  • rust-analyzer → binary download
  • gopls → go install

Each AI coding tool also expects a different config format, written to a different location. Copilot CLI wants ~/.copilot/lsp-config.json. OpenCode wants a project-root config file. None of this is documented in one place. On Windows, things break silently — .cmd wrapper spawning failures, malformed file URIs, line-ending issues.

lspforge replaces all of it.

What lspforge Does

npm install -g lspforge
lspforge init

That’s the happy path. lspforge init scans your project, detects languages, installs the right servers, runs a real LSP protocol handshake to verify each one actually responds, then writes the correct config for every AI tool you have installed.

Not just binary existence — an actual handshake. It verifies the server is alive and responding before writing any config.

Other commands:

CommandWhat it does
lspforge install typescript-language-serverInstall a specific server
lspforge listShow installed servers
lspforge checkHealth-check all servers
lspforge doctorFull environment diagnostics

Supported Configurations

LSP servers: TypeScript, Pyright (Python), rust-analyzer, gopls (Go), ESLint.

AI tool configs written automatically:

ToolConfig location
Claude Code~/.claude/plugins/lspforge/.lsp.json
GitHub Copilot CLI~/.copilot/lsp-config.json
OpenCode / Crushproject-root config

One lspforge init → all three configured, health-checked, ready.

Why It Matters for Copilot and OpenCode Specifically

Most Copilot CLI users don’t know native LSP is supported. When it’s wired correctly, completions are operating with full language intelligence — the AI sees your types, your imports, your project structure. When it isn’t, it’s guessing from text context alone.

OpenCode reads the project-root config automatically. There’s nothing extra to configure — lspforge writes it and OpenCode picks it up.

The gap between “LSP working” and “LSP not working” isn’t subtle. It shows in every completion.

Windows-First

Most CLI tools treat Windows as an afterthought. lspforge was built on Windows and tested on Windows first. The .cmd wrapper spawning issues and URI formatting issues are handled. It works.


The tool is on npm: npm install -g lspforge

Source: github.com/svivekvarma/lspforge