From da8468ae8e3c7e8f27c518ce103737139ad7810c Mon Sep 17 00:00:00 2001 From: Jeremy Watt Date: Sun, 8 Mar 2026 05:05:01 -0700 Subject: [PATCH] chore: add LSP usage instructions to CLAUDE.md --- CLAUDE.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 3ec0e70..7286df4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -119,6 +119,12 @@ export async function POST(request: Request) { - Tailwind v4 with CSS custom properties in `globals.css` - `@/` path alias maps to project root +## LSP Usage + +When navigating code, always prefer the LSP tool (`goToDefinition`, `findReferences`, `documentSymbol`, `hover`) over Grep/Glob for symbol lookup. Use Grep only for text patterns that are not code symbols (e.g. string literals, comments, config values). + +If the LSP tool is unavailable or returns errors, stop and inform the user. Either the `typescript-lsp` plugin needs to be reinstalled (`/plugin` → Discover → `typescript-lsp`) or the language server binary is missing (`npm install -g typescript-language-server typescript`). Do not silently fall back to Grep. + ## Code Quality ### Prettier (`.prettierrc`)