LunarVim not recognizing Haskell Language Server in Nix-environment

60 Views Asked by At

I have a nix working environment (created by my colleague - I have no nix skills myself) for programming in Haskell, and I am using LunarVim as the editor. It is set up on my desktop and my laptop. The setups are close to identical: Both computers have AMD Ryzen processors are running on LinuxMint 21. The only clear hardware difference is that the desktop has an AMD Radeon RX 6700 XT graphics card whereas the Laptop's GPU is NVIDIA GeForce RTX 3070 Mobile. The environment has been git-cloned from a git repository. LunarVim is setup close to identically on both computers and :checkhealth gives very similar output.

On the desktop, it works fine, but on the laptop, I get the error message "Client 1 quit with exit code 1 and signal 0 a short while after starting LunarVim. The Language Server status remains at 'LSP inactive'.

In the lsp-log, the following catches the eye:


$HOME/.local/share/lvim/mason/packages/haskell-language-server/lib/haskell-language-server-2.4.0.0/bin//haskell-language-server-9.2.8: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_ABI_DT_RELR' not found (required by /nix/store/x33pcmpsiimxhip52mwxbb5y77dhmb21-glibc-2.37-8/lib/librt.so.1)


Is this the root of the problem? If yes, how to solve it? If not, how should I continue to troubleshoot?

1

There are 1 best solutions below

0
On

The root of the problem turned out to be a conflict between the Nix environment and Mason. If Mason doesn't provide a HLS, then LunarVim correctly uses the one provided by Nix.

However, Mason is overly eager on installing its own HLS environment even after I uninstall it. The only solution I've found is nukeing any HLS:s Mason has:

rm -r ~/.local/share/lvim/mason/packages/haskell-language-server

(needless to say - be careful with this!)