The process_message case statement in lib/ruby_lsp/server.rb has no else clause, so when the server receives a request for an unsupported method (e.g. textDocument/prepareCallHierarchy), it matches no branch, returns nil, and never sends a response. The LSP spec requires servers to respond to any request bearing an id — for unsupported methods, that's error code -32601 (MethodNotFound). The silent drop causes well-behaved clients to hang indefinitely waiting for a response. Adding an else branch that calls send_message(Error.new(id: message[:id], code: -32601, message: "Method not found: #{message[:method]}")) when message[:id] is present would fix it.
The
process_messagecase statement inlib/ruby_lsp/server.rbhas noelseclause, so when the server receives a request for an unsupported method (e.g.textDocument/prepareCallHierarchy), it matches no branch, returns nil, and never sends a response. The LSP spec requires servers to respond to any request bearing anid— for unsupported methods, that's error code-32601(MethodNotFound). The silent drop causes well-behaved clients to hang indefinitely waiting for a response. Adding anelsebranch that callssend_message(Error.new(id: message[:id], code: -32601, message: "Method not found: #{message[:method]}"))whenmessage[:id]is present would fix it.