lsp-guide

Solid

Recipes for the lsp tool — resolving where a symbol is defined, every place it is used, type signatures and docs, file outlines, and compiler/type errors through a real language server (Go, TypeScript/JavaScript, Python, Rust). Use when navigating or explaining code by symbol, finding callers or usages, checking what broke after an edit, or deciding between lsp and text search.

AI & Automation 4,261 stars 118 forks Updated today NOASSERTION

Install

View on GitHub

Quality Score: 83/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Using the lsp tool The `lsp` tool answers *semantic* questions through the language's own server: it resolves through imports, types, and aliases, where grep only matches text. Reach for it whenever the question is about a **symbol**; keep grep for plain strings, comments, and file types no server supports. ## Operations | Operation | Answers | Needs | |---|---|---| | `definition` | where the symbol at a position is defined | `path`, `line`, `column` | | `references` | every place the symbol at a position is used | `path`, `line`, `column` | | `hover` | type signature + docs for the symbol at a position | `path`, `line`, `column` | | `documentSymbol` | the outline (types, functions, methods) of one file | `path` | | `diagnostics` | compiler/type errors and warnings for one file | `path` | Positions are 1-based, and `column` must point **at the identifier** (its first character works). All paths resolve against the working directory. ## Recipes **"Where is X defined?"** — from any usage site of X: `{"operation": "definition", "path": "<file>", "line": <L>, "column": <C>}`. Don't know a usage site? Find one first (see next recipe's step 1). **"Everywhere X is used"** — two steps, always: 1. Locate the declaration: `rg -n --column '\bX\b'` (the `--column` output is exactly the coordinate the next call needs), or `documentSymbol` when you already know the file. 2. `{"operation": "references", "path": "<decl file>", "line": <L>, "column": <C>}`. A grep hit list is...

Details

Author
workweave
Repository
workweave/router
Created
4 months ago
Last Updated
today
Language
Go
License
NOASSERTION

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

lsp-guide

Recipes for the lsp tool — resolving where a symbol is defined, every place it is used, type signatures and docs, file outlines, and compiler/type errors through a real language server (Go, TypeScript/JavaScript, Python, Rust). Use when navigating or explaining code by symbol, finding callers or usages, checking what broke after an edit, or deciding between lsp and text search.

0 Updated yesterday
daiminking2
Web & Frontend Listed

lsp

Convention for using Language Server Protocol tools for precise code intelligence (references, definitions, type checking) instead of guessing from grep results.

2 Updated 3 weeks ago
Bobi-Labs
AI & Automation Listed

claude-roslyn-lsp

Navigate, refactor and check C# through the claude-roslyn-lsp adapter, which fronts Microsoft's Roslyn language server. Use when a task touches C# symbols rather than C# text — renaming a type or member across a solution, finding callers or implementations, listing what a type has on it, asking whether an edit still compiles, fixing one warning everywhere it occurs, organising usings or formatting — and the adapter is attached as an MCP server (`resolveSymbol`, `findReferences`, `getTypeMembers`, `getDiagnostics`, `getCodeActions`, `applyCodeAction`, `fixDiagnostics`, `renameSymbol`, `formatCode`, `getWorkspaceStatus`), as an LSP server behind the built-in `LSP` tool, or both. Covers the order the calls go in: the symbol before the grep, a semantic rename before an edit, a design-time diagnostic pass before a build, and what to do while the solution is still loading.

1 Updated today
lahma