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

[BUG] LSP manager never picks up server configs during startup

Open mintmcqueen opened this issue 1 month ago • 4 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?

No LSP servers available after installing pyright and typescript servers via plugins. Tried both slash command via TUI and direct CLI install commands.

The LSP manager initializes at startup (with 0 servers) before the plugin system loads, so it never picks up the lspServers configurations from the marketplace.

The config is correct in ~/.claude/plugins/marketplaces/claude-plugins-official/.claude-plugin/marketplace.json - it's just never read by the LSP manager due to initialization timing.

What Should Happen?

The correct initialization order should be:

  1. Load plugins (read marketplace.json, load lspServers configs)
  2. Initialize LSP manager with collected lspServers configs
  3. Register LSP notification handlers for N server(s)

Error Messages/Logs

⏺ LSP(operation: "documentSymbol", file: "src/index.ts")
  ⎿  No LSP server available for file type: .ts

DEBUG LOGS:
07:05:57.331Z - LSP manager initialized with 0 server(s)
07:05:57.336Z - Loading plugin pyright-lsp
07:05:57.345Z - Loading plugin typescript-lsp
07:05:58.418Z - Loaded plugins - Enabled: 2

Steps to Reproduce

  1. Install TypeScript language server: npm install -g typescript-language-server typescript
  2. Install the LSP plugin: claude plugin install typescript-lsp --scope user
  3. Enable the plugin in ~/.claude/settings.json: "enabledPlugins": { "typescript-lsp@claude-plugins-official": true }
  4. Restart Claude Code
  5. Try using the LSP tool on a TypeScript file: LSP operation=documentSymbol filePath=src/index.ts line=1 character=1

Expected: LSP returns symbols from the file

Actual: No LSP server available for file type: .ts

Debug log shows: 07:05:57.331Z [DEBUG] LSP server manager initialized successfully 07:05:57.331Z [DEBUG] LSP notification handlers registered successfully for all 0 server(s) 07:05:57.336Z [DEBUG] Loading plugin pyright-lsp from source: "./plugins/pyright-lsp" 07:05:57.345Z [DEBUG] Loading plugin typescript-lsp from source: "./plugins/typescript-lsp"

Likely root cause: LSP manager initializes before plugins load, so lspServers config in marketplace.json is never registered.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

V2.0.76

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

mintmcqueen avatar Dec 26 '25 07:12 mintmcqueen