The library acts as a client for
lsp-mode first, and either clone
this repository, or install from MELPA. Add the following to your
(require 'lsp) (require 'lsp-haskell) ;; Hooks so haskell and literate haskell major modes trigger LSP setup (add-hook 'haskell-mode-hook #'lsp) (add-hook 'haskell-literate-mode-hook #'lsp)
Note: All three packages are also available via MELPA.
It needs the Haskell language server that you plan to use in your path, so follow the appropriate OSX or Linux section below accordingly.
Language server installation#
If you have installed a server other than
haskell-language-server, make sure to
lsp-haskell-server-path variable to point to the executable you
have installed (see below).
lsp-haskell exposes a number of configuration options under the
customization group, which should be set like normal customization variables.
M-x customize-group to get started.
This includes a few options for for setting the server executable
and arguments, and numerous settings for configuring the server itself (
choice of formatting provider, etc.).
Note that server configuration settings will currently not be applied until the server is restarted.