Skip to content

Latest commit

 

History

History
95 lines (72 loc) · 3.44 KB

README.org

File metadata and controls

95 lines (72 loc) · 3.44 KB

:lang haskell

Description

This module adds Haskell support to Doom Emacs.

Maintainers

  • @iyefrat

Become a maintainer?

Module flags

+lsp
Enable LSP support for haskell-mode. Requires doom-module::tools lsp and a langserver (supports haskell-language-server).
+tree-sitter
Leverages tree-sitter for better syntax highlighting and structural text editing. Requires doom-module::tools tree-sitter.

Packages

  • doom-package:haskell-mode
  • doom-package:lsp-haskell if doom-module:+lsp

Hacks

No hacks documented for this module.

Installation

Enable this module in your doom! block.

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.

Usage

🔨 This module’s usage documentation is incomplete. Complete it?

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

KeybindingDescription
<localleader> bBuild the current cabal project
<localleader> cVisit the .cabal file of the current buffer
<localleader> hToggle visibility of the form at point
<localleader> Hhides all top level functions

Configuration

🔨 This module’s configuration documentation is incomplete. Complete it?

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! lsp-haskell
  (setq lsp-haskell-formatting-provider "brittany"))

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

Appendix

🔨 This module has no appendix yet. Write one?