claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] LSP tool doesn't recognize plugin-based LSP server configurations

Open billychl1 opened this issue 10 months ago • 3 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The LSP tool returns "No LSP server available for file type: .swift" (and similarly for .ts, .dart) even though LSP plugins are properly installed and enabled.

Environment:

  • Claude Code version: 2.0.76
  • OS: macOS Darwin 24.6.0
  • sourcekit-lsp: /usr/bin/sourcekit-lsp (installed via Xcode)

Installed LSP Plugins: { "swift-lsp@claude-plugins-official": true, "typescript-lsp@claude-plugins-official": true, "dart-analyzer@claude-code-lsps": true }

Plugin Configuration (.lsp.json): { "swift": { "command": "sourcekit-lsp", "args": [], "extensionToLanguage": { ".swift": "swift" } } }

Steps to Reproduce:

  1. Install swift-lsp plugin via claude /plugin install swift-lsp@claude-plugins-official
  2. Verify plugin is enabled in ~/.claude/settings.json
  3. Use LSP tool on a .swift file

What Should Happen?

LSP operations work (documentSymbol, goToDefinition, etc.)

Error Messages/Logs

No LSP server available for file type: .swift

Steps to Reproduce

  1. Install swift-lsp plugin via claude /plugin install swift-lsp@claude-plugins-official
  2. Verify plugin is enabled in ~/.claude/settings.json
  3. Use LSP tool on a .swift file

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.0.76

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

billychl1 avatar Jan 05 '26 20:01 billychl1

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/16214
  2. https://github.com/anthropics/claude-code/issues/15168
  3. https://github.com/anthropics/claude-code/issues/15521

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Jan 05 '26 20:01 github-actions[bot]

This issue does NOT seem to be a a duplicate of #16214, #15168, or #15521. Those issues are about the LSP server not being available, but this is different - the LSP server is running successfully, but the LSP tool is never exposed to the assistant.

Environment:

  • Claude Code version: 2.1.1
  • Platform: Linux (AlmaLinux 9)
  • LSP server: clangd 18.1.8 (configured via plugin)
  • Running with --debug flag
  • Claude running on AWS Bedrock

Evidence from debug logs:

The LSP server initializes successfully: [DEBUG] Loaded 1 LSP server(s) from plugin: tools-tree [DEBUG] Total LSP servers loaded: 1 [DEBUG] LSP server manager initialized successfully [DEBUG] LSP server plugin:tools-tree:cpp initialized [DEBUG] LSP client started for plugin:tools-tree:cpp [DEBUG] [LSP SERVER plugin:tools-tree:cpp] I[17:33:26.990] clangd version 18.1.8

But there's no log about the LSP tool being created/registered. Other tools (Bash, Read, Edit, etc.) are available, but LSP does not appear in the available tools list.

According to the changelog, v2.0.74 added the LSP tool, and v2.1.0 fixed it to only enable when LSP servers are configured. In this case, an LSP server IS configured and running, but the tool is still not available.

Expected behavior: When an LSP server is configured and initialized via plugin (.lsp.json), the LSP tool should be automatically available to the assistant.

Actual behavior: LSP server runs successfully, but the LSP tool is never exposed/registered.

joaopixar avatar Jan 09 '26 01:01 joaopixar

Same issue, can we have some tweak?

Programistich avatar Jan 09 '26 13:01 Programistich

Still occurring in Claude Code v2.1.20 (January 2026). The lspServers config exists in marketplace.json but is never processed.

lukelabonte avatar Jan 27 '26 22:01 lukelabonte

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] avatar Feb 28 '26 22:02 github-actions[bot]

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.

github-actions[bot] avatar Mar 09 '26 14:03 github-actions[bot]