[FEATURE] Decouple LSP diagnostic auto-push from the LSP tool (keep navigation, drop publishDiagnostics)
Summary
Request a way to disable automatic diagnostic reporting from an LSP plugin
while keeping the on-demand LSP tool (goToDefinition, findReferences,
hover, documentSymbol, callHierarchy, etc.).
Motivation
Today the two are bundled: registering an LSP server via a plugin
(lspServers: { command, args, extensionToLanguage }) enables both:
- on-demand navigation via the
LSPtool, and - automatic
publishDiagnosticspushed into the agent's context after edits.
The LSP tool itself has no diagnostics operation — so diagnostics arrive
only through the automatic push. There is no config field to keep (1) without
(2). The only lever is disabling the whole plugin, which also loses navigation.
The auto-push can flood the context window (and, in large workspaces, is often
stale — see companion issue), while the navigation tools remain valuable.
Requested
A toggle to suppress automatic diagnostic injection while keeping the LSP server
- navigation tools, e.g. one of:
lspServers.<name>.diagnostics: false, or- a settings.json key (
diagnosticsEnabled: false/lsp.diagnostics: "off"),
or
- an env var.
Granularity (off / errors-only / on-demand-only) would be a bonus.
Not a duplicate of prior (declined) requests
This is deliberately narrower than what was closed before:
- #15101 (CLOSED / not planned) asked to disable LSP entirely — this keeps
the LSP server and all navigation tools, only dropping the diagnostic push.
- #26634 (CLOSED / not planned) asked to filter diagnostics by severity —
this is orthogonal; the ask is to decouple the push channel, not tune it.
- #55019 (OPEN) shows the only current lever is
--disallowedTools LSP, which
removes the LSP tool wholesale — the opposite of what's wanted here.
The distinguishing motivation is context-window cost: the auto-push consumes
tokens every edit, while navigation (goToDefinition/findReferences/hover/etc.)
remains valuable and cheap (pull-based, on demand).
Environment
- Plugin:
typescript-lsp@claude-plugins-officialv1.0.0.
3 Comments
+1 This is still an issue. I want to keep the LSP integration/tools, but don't need the diagnostics. They are often stale and I have a stop hook that already runs validation.
Good news — this is supported in a recent release. In an LSP server's config (the
lspServersentry in your plugin), set"diagnostics": false. That keeps the server running and the LSP navigation tool (go-to-definition, references, hover, etc.) available, but stops diagnostics from being pushed into Claude's context after edits.Docs: https://code.claude.com/docs/en/plugins-reference (see the
diagnosticsfield in the LSP server config table). Changelog: https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md🤖 Generated with Claude Code
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.