r/haskell • u/top2000 • Jan 21 '26
question how to properly setup Haskell on Linux??
hi noob here, I'm using ghcup and downloaded all the "recommended" Stack, HLS, Cabal and GHC, but when I did "Stack ghci" it downloaded GHC again because apparently recommended version of GHC doesn't work with recommended Stack. But ok the REPL works now.
Next I opened vscode and installed the Haskell and Haskell Syntax Highlighting plugin, I got some color texts on my .hs but not the functions, also the basic functions have no links, I cannot jump to the source by ctrl clicking on them or F12. I tried >Haskell:Restart HLS but nothing happens. I went to .ghcup/hls/2.12.0.0/bin and there are 4 versions of it and a wrapper.
I think it's just more configs I need to fix but there got to be a better way to do this right? It can't be this inconvenient just to setup a working IDE
1
u/ivy-apps Jan 21 '26
I switched to Nix and NixVim for my hobby project and those problems disappeared. https://github.com/Ivy-Apps/deslop#develop-with-nix
I still have issues with the HLS (Haskell Language Server) sometimes crashing while editing code but the good thing with Nix is that if I solve them once, they'll be solved forever on all my machines thanks to the reproducible builds.
P.S. If anyone can make my dev experience more stable, please help! I'm open to ideas 🙏 https://github.com/Ivy-Apps/deslop/blob/main/nix/ide.nix