dhall-lang / vscode-dhall-lsp-server

VSCode pluging that provides LSP support for the Dhall programming language
MIT License
17 stars 8 forks source link

Don't error if the server executable can't be exec'd #27

Closed pranaysashank closed 2 years ago

pranaysashank commented 3 years ago

I have a custom wrapper around dhall-lsp-server in the workspace like

direnv exec `pwd` dhall-lsp-server "$@"

The obtainExecutableStatus function errors out when it tries to exec this file. So I changed the error message to an info and continue execution without returning. (vscode's LanguageClient would anyway fail if it can't run the server). I also changed the code so it doesn't exit if the executable timedout for any reason, it just displays a message.

While at it, I also added support for resolving {workspaceFolder} and {home} variables in the executable path similar to how haskell's vscode plugin does.

Sidenote: It's probably better to just check whether the executable exists instead of trying to exec it.