Description
Is your feature request related to a problem? Please describe.
When hls-wrapper realises it is going to fail for one of the following reasons:
- It can't figure out which GHC Version it needs
- It can not find a fitting HLS version for the project's GHC version
Then hls-wrapper writes something to stderr and crashes. This is bad UX as users are often not aware about the stderr output and if they are, have a hard time to read the output.
Describe the solution you'd like
hls-wrapper should realise it is going to fail and become the LSP - Server to report to the client that we failed to launch. It can present the user a reasonable error message in combination with help instructions.
Describe alternatives you've considered
I was unable to come up with a better idea.
Maybe it is enough to send some json messages directly to stdout instead of a full-fledged lsp
dependency.