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

LSP plugin lspServers config not being processed from marketplace.json

Open giovannirco opened this issue 3 weeks ago • 7 comments

Bug Description

The lspServers configuration defined in marketplace.json plugin entries is not being extracted or processed when plugins are loaded. This results in LSP plugins (typescript-lsp, pyright-lsp, gopls-lsp) being installed but non-functional.

Steps to Reproduce

  1. Enable the typescript-lsp plugin:
    claude plugins install typescript-lsp@claude-plugins-official
    
  2. Verify typescript-language-server is installed:
    which typescript-language-server
    # Returns: /opt/homebrew/bin/typescript-language-server
    
  3. Restart Claude Code
  4. Attempt to use LSP:
    LSP documentSymbol on src/server.ts
    

Expected Behavior

LSP operations should work since:

  • The plugin is enabled in settings.json
  • The marketplace.json plugin definition includes proper lspServers config
  • The language server binary is installed

Actual Behavior

No LSP server available for file type: .ts

Debug Log Evidence

2025-12-23T12:09:16.380Z [DEBUG] [LSP MANAGER] initializeLspServerManager() called
2025-12-23T12:09:16.380Z [DEBUG] [LSP MANAGER] Created manager instance, state=pending
2025-12-23T12:09:16.387Z [DEBUG] LSP server manager initialized successfully
2025-12-23T12:09:16.387Z [DEBUG] LSP notification handlers registered successfully for all 0 server(s)
2025-12-23T12:09:16.433Z [DEBUG] Loading plugin typescript-lsp from source: "./plugins/typescript-lsp"
2025-12-23T12:09:16.434Z [DEBUG] Plugin typescript-lsp has no entry.skills defined
2025-12-23T12:09:45.479Z [DEBUG] No LSP server available for file type .ts for operation documentSymbol on file src/server.ts

Key observation: "0 server(s)" - the lspServers config is never loaded.

Root Cause Analysis

The marketplace.json correctly defines lspServers for the plugin:

{
  "name": "typescript-lsp",
  "description": "TypeScript/JavaScript language server for enhanced code intelligence",
  "version": "1.0.0",
  "source": "./plugins/typescript-lsp",
  "lspServers": {
    "typescript": {
      "command": "typescript-language-server",
      "args": ["--stdio"],
      "extensionToLanguage": {
        ".ts": "typescript",
        ".tsx": "typescriptreact",
        ".js": "javascript",
        ".jsx": "javascriptreact",
        ".mts": "typescript",
        ".cts": "typescript",
        ".mjs": "javascript",
        ".cjs": "javascript"
      }
    }
  }
}

However, when the plugin is installed:

  1. Only the plugin source folder contents (just README.md) are copied to cache
  2. The lspServers field from marketplace.json is never extracted or processed
  3. LSP manager initializes with 0 servers before plugins finish loading

Workarounds Attempted (All Failed)

  1. Adding .lsp.json to plugin cache folder - Not read
  2. Adding lspServers to ~/.claude/settings.json - Not a supported setting
  3. Reinstalling the plugin - Same result

Environment

  • Claude Code version: Latest (as of 2025-12-23)
  • OS: macOS Darwin 25.2.0
  • typescript-language-server version: 5.1.3
  • Node.js: 20+

Files Examined

~/.claude/settings.json (has enabledPlugins)
~/.claude/plugins/installed_plugins.json (plugin registered)
~/.claude/plugins/marketplaces/claude-plugins-official/.claude-plugin/marketplace.json (has lspServers)
~/.claude/plugins/cache/claude-plugins-official/typescript-lsp/1.0.0/ (only contains README.md)

Suggested Fix

The plugin loader should:

  1. Extract lspServers from marketplace.json plugin definitions
  2. Register these servers with the LSP manager after plugin loading completes
  3. Or: Store lspServers config in installed_plugins.json for persistence

giovannirco avatar Dec 23 '25 12:12 giovannirco


Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/13952
  2. https://github.com/anthropics/claude-code/issues/14803
  3. https://github.com/anthropics/claude-code/issues/14932

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 Dec 23 '25 12:12 github-actions[bot]

Same problem for me as well, tried the plugin, with whatever mentioned in the doc :- https://code.claude.com/docs/en/plugins-reference#lsp-servers but it's not working.

abhishekc-timedotmoney avatar Dec 24 '25 06:12 abhishekc-timedotmoney

Same issue with me, here is CC thinks

⏺ Here's what I found:

Summary

What typescript-lsp does:

Based on https://github.com/boostvolt/claude-code-lsps and https://code.claude.com/docs/en/plugins:

The typescript-lsp plugin provides:

  1. LSP Tool - Five operations: goToDefinition, findReferences, hover, documentSymbol, workspaceSymbol
  2. Automatic Diagnostics - Real-time TypeScript error/warning detection when reading files

Current Status

You have the plugin installed and enabled:

  • typescript-lsp@claude-plugins-official ✓
  • Underlying LSP server: [email protected] is installed globally ✓

However, it's likely not fully active because:

  1. No LSP server process running - The typescript-language-server isn't currently running

ChrisWiles avatar Dec 25 '25 16:12 ChrisWiles