claude-code
claude-code copied to clipboard
LSP plugins not registering servers - LSP Manager initializes before plugins load
Bug Description
LSP servers from plugins are not being registered. The LSP Manager initializes with 0 servers before the plugins are loaded, so the .lsp.json configurations from LSP plugins are never picked up.
Environment
- Claude Code Version: 2.0.76
- OS: macOS (Darwin 24.6.0)
- Plugin:
vtsls@claude-code-lspsfromboostvolt/claude-code-lspsmarketplace
Steps to Reproduce
- Install vtsls globally:
npm install -g vtsls - Add the claude-code-lsps marketplace to settings.json:
"extraKnownMarketplaces": { "claude-code-lsps": { "source": { "source": "github", "repo": "boostvolt/claude-code-lsps" } } } - Enable the plugin:
"vtsls@claude-code-lsps": trueinenabledPlugins - Restart Claude Code
- Try using the LSP tool on a TypeScript file
Expected Behavior
The LSP tool should work with TypeScript files using the vtsls language server.
Actual Behavior
LSP tool returns: No LSP server available for file type: .ts
Debug Log Evidence
The debug log shows the timing issue:
2025-12-27T16:09:35.099Z [DEBUG] [LSP MANAGER] Starting async initialization (generation 1)
2025-12-27T16:09:35.104Z [DEBUG] LSP server manager initialized successfully
2025-12-27T16:09:35.104Z [DEBUG] LSP notification handlers registered successfully for all 0 server(s)
2025-12-27T16:09:35.110Z [DEBUG] Plugin vtsls@claude-code-lsps version 1.0.0 already cached
2025-12-27T16:09:35.110Z [DEBUG] Loaded hooks from standard location for plugin vtsls
The LSP Manager completes initialization with 0 servers at 16:09:35.104, but the vtsls plugin doesn't finish loading until 16:09:35.110.
Plugin Configuration
The plugin's .lsp.json file at ~/.claude/plugins/cache/claude-code-lsps/vtsls/1.0.0/.lsp.json:
{
"typescript": {
"command": "vtsls",
"args": ["--stdio"],
"extensionToLanguage": {
".ts": "typescript",
".tsx": "typescriptreact",
".js": "javascript",
".jsx": "javascriptreact"
}
}
}
Additional Context
- Plugin validates successfully:
claude plugin validatereturns "✔ Validation passed" - vtsls binary is installed and accessible:
/usr/local/bin/vtsls(v0.3.0) - Multiple restarts of Claude Code don't resolve the issue
- The same issue occurs with
pyright@claude-code-lsps
Suggested Fix
The LSP Manager should either:
- Wait for plugins to load before initializing
- Re-scan for LSP configurations after plugins finish loading
- Support lazy initialization of LSP servers when first needed