merge: rewrite-docs
I've omitted docs/*.org from this merge, as there is still work left to do there, but I am pushing the module docs early so folks can benefit from the new docs sooner.
This commit is contained in:
commit
1f8bf7accb
179 changed files with 13125 additions and 8630 deletions
|
@ -1,43 +1,42 @@
|
|||
#+TITLE: lang/haskell
|
||||
#+DATE: January 16, 2017
|
||||
#+SINCE: v0.7
|
||||
#+STARTUP: inlineimages
|
||||
# -*- mode: doom-docs-org -*-
|
||||
#+title: :lang haskell
|
||||
#+subtitle: A language that's lazier than I am
|
||||
#+created: March 29, 2016
|
||||
#+since: 0.9
|
||||
|
||||
* Table of Contents :TOC:
|
||||
- [[#description][Description]]
|
||||
- [[#maintainers][Maintainers]]
|
||||
- [[#module-flags][Module Flags]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#features][Features]]
|
||||
- [[#configuration][Configuration]]
|
||||
|
||||
* Description
|
||||
Adds Haskell support to Doom Emacs.
|
||||
* Description :unfold:
|
||||
This module adds Haskell support to Doom Emacs.
|
||||
|
||||
** Maintainers
|
||||
This module has no dedicated maintainers.
|
||||
*This module needs a maintainer.* [[doom-contrib-maintainer:][Become a maintainer?]]
|
||||
|
||||
** Module Flags
|
||||
+ =+lsp= Enable LSP support with for [[https://github.com/haskell/haskell-language-server][haskell-language-server]] (requires the =:tools lsp= module).
|
||||
** Module flags
|
||||
- +lsp ::
|
||||
Enable LSP support for ~haskell-mode~. Requires [[doom-module:][:tools lsp]] and a langserver
|
||||
(supports [[https://github.com/haskell/haskell-language-server][haskell-language-server]]).
|
||||
|
||||
** Plugins
|
||||
+ [[https://github.com/haskell/haskell-mode][haskell-mode]]
|
||||
+ [[https://github.com/emacs-lsp/lsp-haskell][lsp-haskell]] (=+lsp=, =:tools lsp=)
|
||||
** Packages
|
||||
- [[doom-package:][haskell-mode]]
|
||||
- [[doom-package:][lsp-haskell]] if [[doom-module:][+lsp]]
|
||||
|
||||
** Hacks
|
||||
/No hacks documented for this module./
|
||||
|
||||
* Installation
|
||||
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
|
||||
|
||||
* Prerequisites
|
||||
It is recommended to install the haskell tooling using [[https://www.haskell.org/ghcup/][ghcup]]. Only ghc is needed
|
||||
for basic functionality:
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
#+begin_src sh
|
||||
ghcup install ghc
|
||||
#+END_SRC
|
||||
#+end_src
|
||||
|
||||
but =+lsp= users should also install the language server:
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
#+begin_src sh
|
||||
ghcup install hls
|
||||
#+END_SRC
|
||||
#+end_src
|
||||
|
||||
Installing [[https://www.haskell.org/cabal/][cabal]] or [[https://docs.haskellstack.org/en/stable/README/][stack]] as well is recommended, and can be done through
|
||||
=ghcup=.
|
||||
|
@ -49,25 +48,44 @@ system package manager, cabal, or stack.
|
|||
formatters such as [[https://github.com/lspitzner/brittany][brittany]], [[https://github.com/ennocramer/floskell][floskell]], [[https://github.com/tweag/ormolu][ormolu]], [[https://github.com/fourmolu/fourmolu][fourmolu]], and [[https://github.com/haskell/stylish-haskell][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
|
||||
* TODO Usage
|
||||
#+begin_quote
|
||||
🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
|
||||
#+end_quote
|
||||
|
||||
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:
|
||||
|
||||
| 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 |
|
||||
| Keybinding | Description |
|
||||
|-----------------+-----------------------------------------------|
|
||||
| [[kbd:][<localleader> b]] | Build the current cabal project |
|
||||
| [[kbd:][<localleader> c]] | Visit the =.cabal= file of the current buffer |
|
||||
| [[kbd:][<localleader> h]] | Toggle visibility of the form at point |
|
||||
| [[kbd:][<localleader> H]] | hides all top level functions |
|
||||
|
||||
* TODO Configuration
|
||||
#+begin_quote
|
||||
🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]]
|
||||
#+end_quote
|
||||
|
||||
* 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.:
|
||||
#+BEGIN_SRC elisp
|
||||
#+begin_src emacs-lisp
|
||||
;; ~/.doom.d/config.el
|
||||
(after!
|
||||
(after! lsp-haskell
|
||||
(setq lsp-haskell-formatting-provider "brittany"))
|
||||
#+END_SRC
|
||||
#+end_src
|
||||
|
||||
* Troubleshooting
|
||||
/There are no known problems with this module./ [[doom-report:][Report one?]]
|
||||
|
||||
* Frequently asked questions
|
||||
/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]]
|
||||
|
||||
* TODO Appendix
|
||||
#+begin_quote
|
||||
🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
|
||||
#+end_quote
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue