diff --git a/modules/lang/haskell/+lsp.el b/modules/lang/haskell/+lsp.el index da53d1f33..f46eb854c 100644 --- a/modules/lang/haskell/+lsp.el +++ b/modules/lang/haskell/+lsp.el @@ -4,10 +4,8 @@ :after lsp-mode :preface (add-hook 'haskell-mode-local-vars-hook #'lsp!) :config - (when IS-MAC - (setq lsp-haskell-process-path-hie "hie-wrapper")) (when (featurep! +ghcide) - (setq lsp-haskell-process-path-hie "ghcide" - lsp-haskell-process-args-hie nil)) + (setq lsp-haskell-server-path "ghcide" + lsp-haskell-server-args nil)) ;; Does some strange indentation if it pastes in the snippet (setq-hook! 'haskell-mode-hook yas-indent-line 'fixed)) diff --git a/modules/lang/haskell/README.org b/modules/lang/haskell/README.org index 1657796a0..19632902d 100644 --- a/modules/lang/haskell/README.org +++ b/modules/lang/haskell/README.org @@ -10,7 +10,7 @@ - [[#plugins][Plugins]] - [[#prerequisites][Prerequisites]] - [[#cabal][Cabal]] - - [[#lsp-haskell-ide-engine][LSP (haskell-ide-engine)]] + - [[#lsp-haskell-language-server][LSP (haskell-language-server)]] - [[#lsp-ghcide][LSP (ghcide)]] - [[#stack][Stack]] - [[#haskell-packages][Haskell packages]] @@ -43,7 +43,7 @@ Here are a few resources I've found indispensable in my Haskell adventures: doesn't depend on =stack=, supports both ~cabal~-only and ~stack~ projects, but lacks eldoc support. + =+ghcide= Enables LSP support with ghcide (requires the ~:tools lsp~ module). -+ =+lsp= Enables LSP support with haskell-ide-engine (requires the ~:tools lsp~ ++ =+lsp= Enables LSP support with haskell-language-server (requires the ~:tools lsp~ module). ** Plugins @@ -59,7 +59,7 @@ Depending on whether you use Dante, haskell-language-server or ghcide, your dependencies will differ: + Dante users need =cabal=, =ghc= and =ghc-mod= -+ LSP users need the =haskell-ide-engine= LSP server OR =ghcide= ++ LSP users need the =haskell-language-server= LSP server OR =ghcide= + All users will need the =hoogle= package ** Cabal @@ -81,27 +81,15 @@ sudo pacman -S cabal-install ghc sudo zypper install cabal-install ghc #+END_SRC -** LSP (haskell-ide-engine) +** LSP (haskell-language-server) You will need =stack= and =git= installed. -You will find a comprehensive [[https://github.com/haskell/haskell-ide-engine#installation][install guide for haskell-ide-engine on its -project page]], but here's a TL;DR: - -*** MacOS -haskell-ide-engine must be build and installed manually on MacOS, e.g. +You will find a comprehensive [[https://github.com/haskell/haskell-language-server#installation][instructions for haskell-language-server on its project page]], but if you are using [[https://www.haskell.org/ghcup/][ghcup]]: #+BEGIN_SRC bash -git clone https://github.com/haskell/haskell-ide-engine -cd haskell-ide-engine -make +ghcup install hls #+END_SRC -*** Arch Linux -=haskell-ide-engine-git= is available on the AUR - -#+BEGIN_SRC bash -yay -S haskell-ide-engine-git -#+END_SRC ** LSP (ghcide) See https://github.com/digital-asset/ghcide for install instructions. diff --git a/modules/lang/haskell/packages.el b/modules/lang/haskell/packages.el index 8d2b45df9..58af9e067 100644 --- a/modules/lang/haskell/packages.el +++ b/modules/lang/haskell/packages.el @@ -1,12 +1,12 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/haskell/packages.el -(package! haskell-mode :pin "41683c0e634bb3f54eac8747919a82132e1714fe") +(package! haskell-mode :pin "e72677668f5fc7cc148008e885a0f256e245dd43") (when (featurep! +dante) - (package! dante :pin "c516bc9e8f09e0f928de9a93e82acfb382636f5c") - (package! attrap :pin "4cf3e4a16255997e7c3c39682a72866a0a37dd4b")) + (package! dante :pin "e2acbf6dd37818cbf479c9c3503d8a59192e34af") + (package! attrap :pin "9c881548debcf59b8aadda0ef4abca3c9a68dd80")) (when (or (and (featurep! +lsp) (not (featurep! :tools lsp +eglot))) (featurep! +ghcide)) - (package! lsp-haskell :pin "17d7d4c6615b5e6c7442828720730bfeda644af8")) + (package! lsp-haskell :pin "a56667b496e5370f1a50310589a2d2a4d3b9d11e")) diff --git a/modules/tools/lsp/README.org b/modules/tools/lsp/README.org index 3fcd9eaf7..a79da7a74 100644 --- a/modules/tools/lsp/README.org +++ b/modules/tools/lsp/README.org @@ -43,7 +43,7 @@ As of this writing, this is the state of LSP support in Doom Emacs: | [[../../lang/elixir/README.org][:lang elixir]] | elixir-mode | elixir-ls | | [[../../lang/fsharp/README.org][:lang fsharp]] | fsharp-mode | Mono, .NET core | | [[../../lang/go/README.org][:lang go]] | go-mode | go-langserver | -| [[../../lang/haskell/README.org][:lang haskell]] | haskell-mode | haskell-ide-engine | +| [[../../lang/haskell/README.org][:lang haskell]] | haskell-mode | haskell-language-server | | [[../../lang/java/README.org][:lang java]] | java-mode | lsp-java | | [[../../lang/javascript/README.org][:lang javascript]] | js2-mode, rjsx-mode, typescript-mode | typescript-language-server | | [[../../lang/ocaml/README.org][:lang ocaml]] | tuareg-mode | ocaml-language-server |