Closed alaird-w closed 3 years ago
Hello,
I've been trying to get doom + haskell language server working with nix and cabal. I need the language server to start in the nix-shell, so I made the following change to config.el:
config.el
;; suggested at https://github.com/emacs-lsp/lsp-haskell/blob/4d85cb3693d893ec34d8a0be9794d468a0a28b7b/lsp-haskell.el#L110 (setq lsp-haskell-server-wrapper-function (lambda (argv) (append (append (list \"nix-shell\" \"-I\" \".\" \"--command\" ) (list (mapconcat 'identity argv \" \")) ) (list (concat (lsp-haskell--get-root) \"/shell.nix\")))))
Note that executing nix-shell works fine. However, I'm still getting the following error in *lsp-haskell::stderr*:
*lsp-haskell::stderr*
"Error when calling cabal v2-exec ghc -v0 -- --numeric-version"
Which executes fine in nix-shell from the command line:
$ nix-shell -I . --command "cabal v2-exec ghc -v0 -- --numeric-version" 8.8.4
tried various different things to get this working, so far no luck. Any suggestions? Thanks!
apologies for missing the escaped quotes (copied from the docstring without looking closely!)
Hello,
I've been trying to get doom + haskell language server working with nix and cabal. I need the language server to start in the nix-shell, so I made the following change to
config.el
:Note that executing nix-shell works fine. However, I'm still getting the following error in
*lsp-haskell::stderr*
:"Error when calling cabal v2-exec ghc -v0 -- --numeric-version"
Which executes fine in nix-shell from the command line:
tried various different things to get this working, so far no luck. Any suggestions? Thanks!