mcpbeat Sign in

Lsp Setup Skill for Codex

Configure a Language Server (LSP) for a specific language so editor/agent tooling — diagnostics, go-to-definition, find-references, rename — works. Use when you need to: configure LSP, lsp setup, set up or install a language server, fix 'no LSP server configured' / 'server not installed', choose between servers (basedpyright vs pyright vs ty vs ruff), or wire .codex/lsp-client.json / .opencode/lsp.json. 언어서버 설정. Routes by file extension to references/<language>/README.md for the exact builtin server, per-OS install commands (macOS/Linux/Windows), config snippets for both config files, initialization options, alternatives, and troubleshooting. Ships scripts: detect-lsp.ts (scan a project for languages + each server's install/config status) and verify-lsp.ts (run a real diagnostics roundtrip). Covers typescript, python, go, rust, c/c++, java, kotlin, c#/razor, swift, ruby, php, dart, elixir, zig, lua, bash, yaml, terraform, haskell, julia.

1.6k tokens
context cost
SKILL.md, read when the skill is used
25
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
67 138
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/code-yeongyu/oh-my-openagent --skill lsp-setup

What comes with it

63 723 bytes besides the instruction
references/bash/README.md
references/c-cpp/README.md
references/csharp/README.md
references/dart/README.md
references/elixir/README.md
references/go/README.md
references/haskell/README.md
references/java/README.md
references/julia/README.md
references/kotlin/README.md
references/lua/README.md
references/php/README.md
references/python/README.md
references/ruby/README.md
references/rust/README.md
references/swift/README.md
references/terraform/README.md
references/typescript/README.md
references/yaml/README.md
references/zig/README.md
scripts/detect-lsp.ts
scripts/lsp-server-table.ts
scripts/tsconfig.json
scripts/verify-lsp.ts

The instruction itself

8 sections, as written by the author

LSP Setup

Configure the right Language Server for a project so the lsp MCP tools

(diagnostics, goto_definition, find_references, symbols, rename)

actually work. This skill is an index: detect what a project needs, install the

server, write the config, then verify with a real roundtrip.

The list of servers we ship as builtin is the source of truth in

packages/lsp-tools-mcp/src/lsp/server-definitions.ts (BUILTIN_SERVERS +

LSP_INSTALL_HINTS). The per-language references below mirror it.


PHASE 0 — LANGUAGE GATE (run first)

Identify the language from the file extension, then **read the matching

reference before installing or configuring anything**.

| Extension(s) | Reference |

|---|---|

| .ts .tsx .js .jsx .mjs .cjs .mts .cts .vue .svelte .astro | references/typescript/README.md |

| .py .pyi | references/python/README.md |

| .go | references/go/README.md |

| .rs | references/rust/README.md |

| .c .cpp .cc .cxx .h .hpp .hh .hxx | references/c-cpp/README.md |

| .java | references/java/README.md |

| .kt .kts | references/kotlin/README.md |

| .cs .razor .cshtml | references/csharp/README.md |

| .swift | references/swift/README.md |

| .rb .rake .gemspec .ru | references/ruby/README.md |

| .php | references/php/README.md |

| .dart | references/dart/README.md |

| .ex .exs | references/elixir/README.md |

| .zig .zon | references/zig/README.md |

| .lua | references/lua/README.md |

| .sh .bash .zsh .ksh | references/bash/README.md |

| .yaml .yml | references/yaml/README.md |

| .tf .tfvars | references/terraform/README.md |

| .hs .lhs | references/haskell/README.md |

| .jl | references/julia/README.md |


WORKFLOW — detect → install → configure → verify

1. Detect

Scan the project to see which languages are present and whether each server is

installed and configured:

bun scripts/detect-lsp.ts <projectDir>      # human report (default: cwd)
bun scripts/detect-lsp.ts <projectDir> --json

For each detected language it prints the builtin server id, the executable it

needs on PATH, whether that executable is installed, an install hint, and

whether a project config file already references it.

2. Install

Open references/<language>/README.md and run the install command for your OS.

Then confirm the executable resolves:

command -v <server-executable>   # e.g. typescript-language-server, gopls, rust-analyzer

3. Configure

Most builtin servers need no config — they are resolved automatically by

file extension. Write config only to: pick between competing servers, set a

priority, pass initialization options, override extensions, set env, or

disable a server.

Two project-scoped config files, identical JSON shape:

  • Codex harness → .codex/lsp-client.json (user: ~/.codex/lsp-client.json)
  • OpenCode/omo harness → .opencode/lsp.json (also .omo/lsp.json)
{
  "lsp": {
    "<server-id>": {
      "command": ["<bin>", "<args>"],   // optional for builtin ids (supplied automatically)
      "extensions": [".ext"],            // optional override
      "priority": 100,                    // higher wins when several servers match an extension
      "initialization": { },              // server-specific initializationOptions
      "env": { "KEY": "value" },          // optional
      "disabled": false                   // set true to turn a server off
    }
  }
}

Rules enforced by config-loader.ts:

  • In a project config (.codex/lsp-client.json, .opencode/lsp.json) an

entry whose id is a builtin server inherits command automatically — you

only override extensions / priority / initialization. A non-builtin id

in a project config is ignored.

  • To define a fully custom (non-builtin) server with its own command, put

it in the user config (~/.codex/lsp-client.json, or the path set by

LSP_TOOLS_MCP_USER_CONFIG), where command + extensions are honored.

  • Project entries win over user entries; both win over builtin defaults.

Each language reference gives a ready-to-paste snippet.

4. Verify

Run a real diagnostics roundtrip against a source file. This spawns the server,

opens the file, requests diagnostics, and reports OK/FAIL:

bun scripts/verify-lsp.ts <path/to/file.ext>
bun scripts/verify-lsp.ts <file> --timeout=90000

OK = the server started and answered. FAIL: language server not installed

= go back to step 2. Other FAIL text carries the server/startup error.

SKIP = the engine source could not be located; run from inside the omo

repo/worktree, or call the lsp MCP diagnostics tool directly.


Scripts

| Script | Purpose |

|---|---|

| scripts/detect-lsp.ts | Scan a directory; per detected language report server id, install status, install hint, config status. --json for machine output. |

| scripts/verify-lsp.ts | Real LSP diagnostics roundtrip for one file via the lsp-tools-mcp engine; OK/FAIL/SKIP + exit code 0/1/3. |

| scripts/lsp-server-table.ts | Embedded snapshot of the primary builtin server per language (mirrors server-definitions.ts). |

Run with Bun: curl -fsSL https://bun.sh/install | bash.

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×16

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

2.3k tokens scripts
Finishing A Development Branch
by ZhanlinCui
×9

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1.1k tokens
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

3.4k tokens scripts
Vercel React Best Practices
by ratacat
×7

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

1.3k tokens
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

1.1k tokens
Using Git Worktrees
by ZhanlinCui
×6

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1.4k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

1k tokens

How to use it

Copy the folder

Take code-yeongyu/lsp-setup from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.