Show message to the user in case of language server starting error
See original GitHub issueStarting a language server via a client.start()
can result in an error. Usually the stdout or stderr for the server process contain hints to what the problem could be. In case of such an error while starting the server, the only message displayed to the user is something like:
[Error - 1:33:53 PM] Connection to server got closed. Server will not be restarted.
I wonder if there’s any way to improve the situation and display the stdout/stderr from the server to the user when the language server fails to start. The clientOptions
include a errorHandler
that can be customized, but that doesn’t seem to help, since when the issue occurs the closed()
method does not get any arguments.
Note: I’m not a Typescript / JS developer myself, so there may be something I’m missing.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:14 (11 by maintainers)
Top Results From Across the Web
Language Server Extension Guide - Visual Studio Code
Let's build a simple Language Server extension that implements autocomplete and diagnostics for plain text files. We will also cover the syncing of ......
Read more >Developing a Minimal Language Server for the Frege ...
Firstly, I port the example server from Typescript to Java and secondly, I integrate the Frege compiler to show compiler errors and type...
Read more >Lsp - Neovim docs
Nvim supports the Language Server Protocol (LSP), which means it acts as a client to ... window/showMessage window/showDocument window/showMessageRequest ...
Read more >Fortran language server (fortls) error in VSCode (Windows)
I confirmed what mo_sal observed in his case. I installed Modern-Fortran extension (v3.4.2022111811) on ...
Read more >A Language Server For DOT With Visual Studio Code
The editor will then take care of communicating the mistake to the user, usually by underlining the text. But nothing forbids the client...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The handler now allows to return a message that will be presented to the user with a button to open the output channel (which contains stdout)
I think Roberto is talking about a scenario where the server is misconfigured, and fails to start.
At the moment you just get an error saying the server did not start, and eventually reports 5 failures and stops.
Perhaps we could have an option when that point is reached to display whatever the server did emit on stdout/stderr somewhere on the client.