LSP Tools Plugin
LSP-first code intelligence for Claude Code with strong enforcement patterns

Overview
LSP Tools enforces semantic code navigation using Language Server Protocol, providing IDE-like precision for code operations. The plugin ensures Claude uses LSP operations before modifying code, analyzes impact before refactoring, and verifies changes with diagnostics.
Part of the zircote-lsp marketplace - A collection of LSP-focused plugins for Claude Code.
Key Features
- Three Iron Laws - Mandatory behavioral constraints for code operations
- 14 Language Support - TypeScript, Python, Go, Rust, Java, Kotlin, C/C++, C#, PHP, Ruby, HTML/CSS, LaTeX, Markdown, Terraform
- Setup Command - Automatically configures hooks for your project
- Specialized Plugin Integration - Defers to
zircote/*-lsp plugins when installed
- Decision Trees - Clear guidance on when to use LSP vs Grep vs Glob
Installation
# Install from zircote-lsp marketplace
/plugin install lsp-tools@zircote-lsp
Prerequisites
-
Enable LSP in Claude Code:
# Add to your shell profile (~/.bashrc, ~/.zshrc)
export ENABLE_LSP_TOOL=1
-
Install language servers for your languages:
# TypeScript/JavaScript
npm install -g @vtsls/language-server typescript
# Python
npm install -g pyright
# Go
go install golang.org/x/tools/gopls@latest
# Rust
rustup component add rust-analyzer
See references/lsp-setup-verification.md for all languages.
Usage
The Three Iron Laws
The skill enforces these mandatory behaviors:
1. NO MODIFYING UNFAMILIAR CODE WITHOUT goToDefinition FIRST
2. NO REFACTORING WITHOUT findReferences IMPACT ANALYSIS FIRST
3. NO CLAIMING CODE WORKS WITHOUT LSP DIAGNOSTICS VERIFICATION
Trigger Phrases
The skill activates when you say:
- "find definition", "go to definition", "where is X defined"
- "find references", "who uses this", "what calls this function"
- "understand this code", "trace this function", "explore codebase"
- "before I refactor", "impact of changing", "safe to rename"
- "analyze dependencies", "call hierarchy", "incoming calls"
Setup Command
Set up LSP hooks for your project:
# Auto-detect languages in project
/lsp-tools:lsp-setup
# Specify languages explicitly
/lsp-tools:lsp-setup typescript python
# Single language
/lsp-tools:lsp-setup go
This command:
- Detects languages used in your project
- Copies appropriate hooks to
.claude/hooks.json
- Optionally appends LSP guidance to
CLAUDE.md
LSP Operations
| Operation | Purpose | Use Before |
|---|
goToDefinition | Jump to where symbol is defined | Modifying unfamiliar code |
findReferences | Find all usages of a symbol | Refactoring, renaming |
goToImplementation | Find interface implementations | Working with polymorphism |
hover | Get type info, docs, signatures | Understanding APIs |
documentSymbol | List all symbols in a file | Understanding large files |
workspaceSymbol | Search symbols across codebase | Finding related code |
incomingCalls | Find callers of a function | Impact analysis |
outgoingCalls | Find functions called by target | Dependency tracing |
Decision Tree
WHAT DO YOU NEED?
│
├─ Symbol definition or implementation
│ └─ USE LSP: goToDefinition, goToImplementation
│
├─ All usages of a symbol
│ └─ USE LSP: findReferences
│
├─ Type info, docs, or signatures
│ └─ USE LSP: hover
│
├─ Call graph or dependencies
│ └─ USE LSP: incomingCalls, outgoingCalls
│
├─ Literal text search (TODOs, strings, config)
│ └─ USE: Grep
│
└─ File discovery by pattern
└─ USE: Glob
Supported Languages