I installed ghcup and:
- Stack 2.9.1
- HLS 1.8.0
- cabal 3.6.2
- GHC 9.2.5
All of them are the recommended versions(I verified it using ghcup tui). Then I installed the Haskell extension in VSCode. Unfortunately, it doesn't work. I get syntax highlighting (from the Haskell Syntax Highlighting extension, which seems to be automatically installed alongside the Haskell extension) but there is no Intellisense, no code completion, no error detection and no interactive mode (-->>> evaluation). I experimented with different folders and haskell files. The filetype is correct, because every time I open a .hs file, the Haskell extension checks for updates. I even installed Codium, because I suspected a fault in VSCode, but it was the same there as well.
The hsl language server doesn't seem to be working in Neovim, either. I uninstalled ghcup (ghcup nuke) and reinstalled again. The result is exactly the same. I prepended the PATH and chose vanilla and non-vanilla Stack integration in either installations.
Am I doing something wrong?
OS: Linux Mint on Ubuntu 20.04.1, kernel 5.15.0-56.
After around 10 tries, I managed to fix the problem. It turned out I had three problems:
haskell-language-serverfiles were missing. I enlarged my Linux partition (something I should have done months ago). The new installation installed all files~/.ghcup/config.yaml:HaskellVS Code extension but crashed 5 times and gave up on trying. Restarting it manually didn't help. I opened the logs:View->Output->Haskelland saw the error:It turns out, my Linux Mint distribution uses
GLIBC_2.31, not2.32. This is a very important library, which most applications on the system use. If you are a newbie, it is strongly advised that you DO NOT update it manually.HLS, which usedGLIBC_2.31. This problem occured in September and was "fixed" but apparently not very well. There are two options:HLS deb10version manually (didn't work for me):ghcup tuiHLS version1.7.0.0(or whatever newest, which uses yourglibcversion) and a GHC, which supports that particular version of the HLS (in my case9.0.2).HLS, so that its settings are restored to default. It takes up to 20 seconds to initialize the server, so be patient. You can see what's happening in theOutputwindow and verify there are no more errors.I hope this helps.