doomemacs/modules/lang/haskell
Itai Y. Efrat d1555257a8 docs(haskell): rewrite readme
A lot of it was outdated, and now it conforms to the readme template.
2021-09-15 01:56:26 +03:00
..
+lsp.el refactor!(haskell): remove ghcide support 2021-09-15 01:56:26 +03:00
autoload.el lang/haskell: remove intero support 2020-04-14 19:27:33 -04:00
config.el refactor!(haskell): remove dante support 2021-09-15 01:56:26 +03:00
doctor.el refactor!(haskell): remove dante support 2021-09-15 01:56:26 +03:00
packages.el refactor!(haskell): remove dante support 2021-09-15 01:56:26 +03:00
README.org docs(haskell): rewrite readme 2021-09-15 01:56:26 +03:00

lang/haskell

Description

Adds Haskell support to Doom Emacs.

Maintainers

This module has no dedicated maintainers.

Module Flags

Plugins

Prerequisites

It is recommended to install the haskell tooling using ghcup. Only ghc is needed for basic functionality:

ghcup install ghc

but +lsp users should also install the language server:

ghcup install hls

Installing cabal or stack as well is recommended, and can be done through ghcup.

haskell-mode provides support for hoogle, which can be installed through system package manager, cabal, or stack.

haskell-language-server provides support for hlint, and haskell code formatters such as brittany, floskell, ormolu, fourmolu, and stylish-haskell, which can be installed through system package manager, cabal, or stack.

Features

This module intergrates the haskell packages into Doom by providing things such as repl support, project root recognition, etc. It also provide the following keybindings:

Keybinding Description
<localleader> b Build the current cabal project
<localleader> c Visit the .cabal file of the current buffer
<localleader> h Toggle visibility of the form at point
<localleader> H hides all top level functions

Configuration

After installing your preferred formatter, make sure to set lsp-haskell-formatting-provider to it.

Make sure to configure the lsp to use your perfered formatter, e.g.:

;; ~/.doom.d/config.el
(after!
  (setq lsp-haskell-formatting-provider "brittany"))