emacs-lsp / lsp-haskell

lsp-mode :heart: haskell
https://emacs-lsp.github.io/lsp-haskell
GNU General Public License v3.0
227 stars 56 forks source link

lsp-haskell restarts and exits again non-stop (every split second): Arch Linux #136

Closed ianyepan closed 2 years ago

ianyepan commented 2 years ago

As titled, I'm on Emacs 27.02 on Arch Linux, with haskell-language-server installed from this recommended AUR package: https://aur.archlinux.org/packages/haskell-language-server-static

When I enter a haskell buffer (with lsp enabled), the server connects and exits abnormally and restarts and exits over and over again, non-stop, (around 5 times / second), flashing the echo area.

Here's a snippet from my Messages buffer:

LSP :: Connected to [lsp-haskell:7023/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7033/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7043/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7053/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7063/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7073/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7083/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7093/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7103/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7113/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7123/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7133/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7143/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7153/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7163/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
LSP :: Connected to [lsp-haskell:7173/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
michaelpj commented 2 years ago

This is a haskell-language-server issue, please reopen there. And have a read of their troubleshooting doc.

ianyepan commented 2 years ago

I solved the problem by identifying the stack-downloaded ghc with stack path, and put it under my $PATH.

export PATH="$PATH:$HOME/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7/bin"