fsprojects / fsharp-language-server

Other
219 stars 37 forks source link

Requests with no result now yields a response with empty result #40

Closed mrbech closed 5 years ago

mrbech commented 5 years ago

So similarly to https://github.com/georgewfraser/fsharp-language-server/pull/39 I also ran into that https://github.com/natebosch/vim-lsc sends a "shutdown" request, waits for a response (with timeout of 5 seconds) and then sends an "exit" to the language server. With this language server, it times out (so vim takes 5 seconds to close).

This is because the fsharp language server does not respond to requests where there is no result (like "shutdown"), the specification (https://microsoft.github.io/language-server-protocol/specification) defines:

Every processed request must send a response back to the sender of the request.

So I made the change here and tested with vim-lsc and it works :) As I see it this shouldn't create any issues with other clients.

georgewfraser commented 5 years ago

Thanks!

georgewfraser commented 5 years ago

@mrbech would you mind checking this all still works after https://github.com/georgewfraser/fsharp-language-server/commit/ec7f63ff0eddb4bde176c3e8dee1809190db5b70

mrbech commented 5 years ago

Still works, thanks :+1: