Claude Cursor opencode Skill

lsp-setup

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 in

LLM Mart · 0 points · 17 views 0 listing impressions 0 install-command copies
Download code-yeongyu-oh-my-openagent-packages_shared-skills_skills_lsp-setup-05dcba6.zip · 32 KB
This skill couldn't be refreshed from GitHub on the last check — you're seeing the last imported snapshot.

Install

skills CLI npx skills add https://github.com/code-yeongyu/oh-my-openagent/tree/dev/packages/shared-skills/skills/lsp-setup
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install code-yeongyu-oh-my-openagent@llmmart
Git git clone https://github.com/code-yeongyu/oh-my-openagent.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole code-yeongyu/oh-my-openagent collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

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.

Files (oh-my-openagent)
  • references
    • bash
      • README.md 2.1 KB
        Loading…
    • c-cpp
      • README.md 2.4 KB
        Loading…
    • csharp
      • README.md 2.4 KB
        Loading…
    • dart
      • README.md 1.9 KB
        Loading…
    • elixir
      • README.md 2.1 KB
        Loading…
    • go
      • README.md 1.9 KB
        Loading…
    • haskell
      • README.md 2.3 KB
        Loading…
    • java
      • README.md 2.6 KB
        Loading…
    • julia
      • README.md 2.3 KB
        Loading…
    • kotlin
      • README.md 2.4 KB
        Loading…
    • lua
      • README.md 2 KB
        Loading…
    • php
      • README.md 1.9 KB
        Loading…
    • python
      • README.md 2.9 KB
        Loading…
    • ruby
      • README.md 2.3 KB
        Loading…
    • rust
      • README.md 2 KB
        Loading…
    • swift
      • README.md 2.2 KB
        Loading…
    • terraform
      • README.md 2.2 KB
        Loading…
    • typescript
      • README.md 3.2 KB
        Loading…
    • yaml
      • README.md 2.3 KB
        Loading…
    • zig
      • README.md 1.7 KB
        Loading…
  • scripts
    • detect-lsp.ts 6.5 KB
      Loading…
    • lsp-server-table.ts 5.1 KB
      Loading…
    • tsconfig.json 397 B
      Loading…
    • verify-lsp.ts 5.1 KB
      Loading…
  • SKILL.md 5.4 KB
    ---
    name: lsp-setup
    description: "Configures a language server so editor/agent tooling (diagnostics, go-to-definition, references, rename) works. Use when a project needs an LSP installed or wired, or a 'no LSP server configured' error appears."
    ---
    
    # 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:
    
    ```bash
    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:
    
    ```bash
    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`)
    
    ```jsonc
    {
      "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`:
    
    ```bash
    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](https://bun.sh): `curl -fsSL https://bun.sh/install | bash`.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.