mrcjkb / haskell-tools.nvim

🦥 Supercharge your Haskell experience in neovim!
GNU General Public License v2.0
432 stars 18 forks source link

dont propose to restart ghc when not available #338

Closed teto closed 6 months ago

teto commented 6 months ago

Feature description

I have almost nothing in my global PATH and configure tooling on a per-project basis. Only when entering nix develop I get my LSP, compilers etc.

One issue I have with haskell-tools is when if I open my projects for a quick look/edit without entering the nix-shell, I get this annoying popup "Failed to find the GHC version of this Cabal project." image

This is bound to fail, I would prefer just a warning notification without the vim.ui.select call. Not sure how to fix, just wanted to share my workflow.

mrcjkb commented 6 months ago

I think that's an error message from haskell-language-server?

https://github.com/haskell/haskell-language-server/issues/3215

I don't call vim.lsp.start is haskell-language-server isn't found, but the behaviour if it fails to start is handled by Neovim.

Maybe there's an option in vim.lsp.start() to suppress retry prompts?

teto commented 6 months ago

Maybe it's just a neovim configuration issue but looks like there is something in the LSP protocol so reported here instead https://github.com/haskell/haskell-language-server/issues/4006