docs(:lang): update READMEs to new format

This commit is contained in:
Henrik Lissner 2021-10-16 01:28:32 +02:00 committed by Henrik Lissner
parent ca7579a1e9
commit 20cac97c08
61 changed files with 4261 additions and 2634 deletions

View file

@ -1,43 +1,43 @@
#+TITLE: lang/haskell
#+DATE: January 16, 2017
#+SINCE: v0.7
#+STARTUP: inlineimages
← [[doom-module-index:][Back to module index]] ↙ [[doom-module-issues:::lang haskell][Issues]] ↖ [[doom-module-source:lang/haskell][Source]] ± [[doom-suggest-edit:][Suggest edits]] ? [[doom-help-modules:][Help]]
--------------------------------------------------------------------------------
#+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 +49,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!
(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