dante icon indicating copy to clipboard operation
dante copied to clipboard

How is this related to the haskell-language-server?

Open xeruf opened this issue 4 years ago • 2 comments

Am I supposed to use either, can they be combined? I really have no idea, and the internet is sparse on this.

xeruf avatar Feb 18 '21 09:02 xeruf

Aha, apparently both have their place, where dante is the more simple and lightweight option? https://develop.spacemacs.org/layers/+lang/haskell/README.html#choosing-a-backend

xeruf avatar Feb 18 '21 09:02 xeruf

haskell-language-server is ultimately an executable that implements of the Language Server Protocol (LSP). Editors supporting the protocol can "talk" to it and get various diagnostics, jump to definition, etc. For that you'll need both haskell-language-server installed and some kind of editor integration, for Emacs that would probably be either lsp-mode or eglot - packaget that implement LSP.

This project predates LSP by some time and provides similar functionality basically by using Haskell's REPL in the form of ghci executable. There are less feauters that in LSP (e.g. dante cannot do automated identifier renames because ghci cannot do it) but overall one can get pretty lot from ghci, e.g. on the fly checking, type of identifier at point, jump to definition. This project is Emacs-specific and is not directly reusable by other editors.

sergv avatar Jan 07 '22 00:01 sergv