kabouzeid/nvim-lspinstall

haskell does not work (`cmd_cwd` changes and hls can't find hie.yaml)

Frefreak opened this issue · 0 comments

It seems currently when using (lspinstall 54b4392, lspconfig 31615992abe962ad2b08ad3e23b8a0df006a8328, neovim v0.6.0-dev+223-g384a43fe7) together, the behaviour when opening a .hs file is that somebody will chdir to the language server's install path (for haskell that is $HOME/.local/share/nvim/lspinstall/haskell in linux), but because hls is cwd sensitive it will just exit if it can't find a hie.yaml under current directory.
I see that lspinstall would set a cmd_cwd during setup which might be the cause. Set this to something like vim.loop.cwd() during require'lspconfig'.haskell.setup can workaround this but maybe this shouldn't be set in the first place?