From 6f2e05ea7693981acb6fd57f9fc82890e4a46765 Mon Sep 17 00:00:00 2001 From: "Itai Y. Efrat" Date: Tue, 3 Aug 2021 18:08:37 +0300 Subject: [PATCH] refactor!(haskell): remove ghcide support BREAKING CHANGE: ghcide was archived a while back and now primarily exists as a library used in the development of haskell-language-server. It is not recommended for end-users, only for development. To this end I think including it in the module is more misleading than helpful, and the people that really want to use it can easily set it up themselves. Ref: https://github.com/haskell/ghcide/pull/939 --- docs/modules.org | 2 +- modules/lang/haskell/+lsp.el | 3 --- modules/lang/haskell/README.org | 14 ++++---------- modules/lang/haskell/config.el | 4 +--- modules/lang/haskell/packages.el | 5 ++--- 5 files changed, 8 insertions(+), 20 deletions(-) diff --git a/docs/modules.org b/docs/modules.org index 539f24be7..3ecfd48c5 100644 --- a/docs/modules.org +++ b/docs/modules.org @@ -117,7 +117,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/fstar/README.org][fstar]] - F* support + [[file:../modules/lang/gdscript/README.org][gdscript]] =+lsp= - TODO + [[file:../modules/lang/go/README.org][go]] =+lsp= - TODO -+ [[file:../modules/lang/haskell/README.org][haskell]] =+dante +ghcide +lsp= - TODO ++ [[file:../modules/lang/haskell/README.org][haskell]] =+dante +lsp= - TODO + hy - TODO + [[file:../modules/lang/idris/README.org][idris]] - TODO + java =+meghanada +eclim +lsp= - TODO diff --git a/modules/lang/haskell/+lsp.el b/modules/lang/haskell/+lsp.el index f46eb854c..18bbb1e05 100644 --- a/modules/lang/haskell/+lsp.el +++ b/modules/lang/haskell/+lsp.el @@ -4,8 +4,5 @@ :after lsp-mode :preface (add-hook 'haskell-mode-local-vars-hook #'lsp!) :config - (when (featurep! +ghcide) - (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 19632902d..0fa683fa0 100644 --- a/modules/lang/haskell/README.org +++ b/modules/lang/haskell/README.org @@ -11,7 +11,6 @@ - [[#prerequisites][Prerequisites]] - [[#cabal][Cabal]] - [[#lsp-haskell-language-server][LSP (haskell-language-server)]] - - [[#lsp-ghcide][LSP (ghcide)]] - [[#stack][Stack]] - [[#haskell-packages][Haskell packages]] - [[#configuration][Configuration]] @@ -20,7 +19,7 @@ * Description This module adds [[https://www.haskell.org/][Haskell]] support, powered by either [[https://github.com/jyp/dante][dante]] (the default) or LSP -(haskell-language-server or ghcide). +(haskell-language-server). + Code completion (~company-ghc~) + Look up documentation (~hoogle~) @@ -42,9 +41,7 @@ Here are a few resources I've found indispensable in my Haskell adventures: + =+dante= Enables dante; a fork of intero aimed at lightweightedness. It 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-language-server (requires the ~:tools lsp~ - module). ++ =+lsp= Enables LSP support with haskell-language-server (requires the ~:tools lsp~ module). ** Plugins + [[https://github.com/haskell/haskell-mode][haskell-mode]] @@ -55,11 +52,11 @@ Here are a few resources I've found indispensable in my Haskell adventures: + [[https://github.com/emacs-lsp/lsp-haskell][lsp-haskell]] * Prerequisites -Depending on whether you use Dante, haskell-language-server or ghcide, your +Depending on whether you use Dante or haskell-language-server, your dependencies will differ: + Dante users need =cabal=, =ghc= and =ghc-mod= -+ LSP users need the =haskell-language-server= LSP server OR =ghcide= ++ LSP users need the =haskell-language-server= LSP server + All users will need the =hoogle= package ** Cabal @@ -90,9 +87,6 @@ You will find a comprehensive [[https://github.com/haskell/haskell-language-serv ghcup install hls #+END_SRC -** LSP (ghcide) -See https://github.com/digital-asset/ghcide for install instructions. - ** Stack To use LSP, you need =stack=: diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index a65ce74fb..63688e651 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -47,6 +47,4 @@ ;;; Backends (cond ((featurep! +dante) (load! "+dante")) - ((or (featurep! +lsp) - (featurep! +ghcide)) - (load! "+lsp"))) + ((featurep! +lsp) (load! "+lsp"))) diff --git a/modules/lang/haskell/packages.el b/modules/lang/haskell/packages.el index ea48bca84..3c1b5fad9 100644 --- a/modules/lang/haskell/packages.el +++ b/modules/lang/haskell/packages.el @@ -6,7 +6,6 @@ (when (featurep! +dante) (package! dante :pin "8741419333fb85ed2c1d71f5902688f5201b0a40") (package! attrap :pin "a5bc695af27349ae6fe4541a581e6fd449d2a026")) -(when (or (and (featurep! +lsp) - (not (featurep! :tools lsp +eglot))) - (featurep! +ghcide)) +(when (and (featurep! +lsp) + (not (featurep! :tools lsp +eglot))) (package! lsp-haskell :pin "4e62cf897dd9e9fcef25c6e8e483490a07a5d439"))