Preflight Checklist
What's Wrong?
The built-in LSP support doesn't work with csharp-ls (C# language server). The LSP client is missing handlers for several standard LSP requests that csharp-ls requires during initialization:
workspace/configuration - Server requests configuration settings (specifically the solution path)
client/registerCapability - Server dynamically registers capabilities
window/workDoneProgress/create - Server creates progress tokens for indexing feedback
Additionally, the workspace configuration capability is disabled (configuration:!1 in cli.js).
Without these, the server fails to initialize properly and returns empty results for operations like documentSymbol, hover, etc.
What Should Happen?
The LSP client should handle these standard LSP protocol requests so that csharp-ls (and other language servers that use these features) work out of the box.
After manually patching cli.js to add these handlers, all LSP operations work correctly (documentSymbol, hover, goToDefinition, findReferences).
Error Messages/Logs
Steps to Reproduce
- Configure csharp-ls plugin in
~/.claude/plugins/csharp-lsp/config.json
- Open a C# project with a .sln file
- Try any LSP operation on a .cs file, e.g.:
LSP documentSymbol
- Operation returns empty results or fails
Debug logs show:
- Server sends
workspace/configuration request → no handler
- Server sends
client/registerCapability request → no handler
- Server sends
window/workDoneProgress/create request → no handler
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Note: This issue persists even after applying the LSP initialize() fix from:
https://gist.github.com/Zamua/f7ca58ce5dd9ba61279ea195a01b190c
That fix addresses the empty initialize() function (issue #13952), but csharp-ls
still fails because it requires these additional LSP protocol handlers that the
client doesn't implement:
workspace/configuration - needs to return solution path
client/registerCapability - dynamic capability registration
window/workDoneProgress/create - progress token creation
The gist fix enables LSP servers to load, but csharp-ls specifically needs these
request handlers to function. Other LSP servers (like typescript-lsp) may work
without them, but csharp-ls requires all three during initialization.
Workaround: Patch cli.js to:
- Enable
capabilities.workspace.configuration: true
- Add handlers:
B.onRequest("workspace/configuration", (P) => {
return P.items.map((b) => {
if (b.section === "csharp") return { solution: "path/to/Solution.sln" };
return {};
});
});
B.onRequest("client/registerCapability", () => null);
B.onRequest("window/workDoneProgress/create", () => null);
Suggested fix: The LSP plugin config already has a solution field - this could be read by the workspace/configuration handler instead of requiring manual patching.
csharp-ls version: 0.19.0
Preflight Checklist
What's Wrong?
The built-in LSP support doesn't work with
csharp-ls(C# language server). The LSP client is missing handlers for several standard LSP requests that csharp-ls requires during initialization:workspace/configuration- Server requests configuration settings (specifically the solution path)client/registerCapability- Server dynamically registers capabilitieswindow/workDoneProgress/create- Server creates progress tokens for indexing feedbackAdditionally, the workspace configuration capability is disabled (
configuration:!1in cli.js).Without these, the server fails to initialize properly and returns empty results for operations like
documentSymbol,hover, etc.What Should Happen?
The LSP client should handle these standard LSP protocol requests so that csharp-ls (and other language servers that use these features) work out of the box.
After manually patching cli.js to add these handlers, all LSP operations work correctly (documentSymbol, hover, goToDefinition, findReferences).
Error Messages/Logs
Steps to Reproduce
~/.claude/plugins/csharp-lsp/config.jsonLSP documentSymbolDebug logs show:
workspace/configurationrequest → no handlerclient/registerCapabilityrequest → no handlerwindow/workDoneProgress/createrequest → no handlerClaude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Note: This issue persists even after applying the LSP initialize() fix from:
https://gist.github.com/Zamua/f7ca58ce5dd9ba61279ea195a01b190c
That fix addresses the empty initialize() function (issue #13952), but csharp-ls
still fails because it requires these additional LSP protocol handlers that the
client doesn't implement:
workspace/configuration- needs to return solution pathclient/registerCapability- dynamic capability registrationwindow/workDoneProgress/create- progress token creationThe gist fix enables LSP servers to load, but csharp-ls specifically needs these
request handlers to function. Other LSP servers (like typescript-lsp) may work
without them, but csharp-ls requires all three during initialization.
Workaround: Patch cli.js to:
capabilities.workspace.configuration: true