git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
cd ~/.emacs.d
bin/doom install
Optional
You can backup your existing ~/.emacs.d
, if you have one. If you want to revert back to your older emacs setup, just copy the backup back into ~/.emacs.d
and restart emacs
Install haskell-language-server, which is the lsp implementation for haskell, using ghcup.
ghcup install hls 0.8.0
To enable haskell, in ~/.doom.d/packages.el
add these line:
(package! haskell-mode)
(package! lsp-haskell)
And then in ~/.doom.d/init.el
,
- under
:tools
, addlsp
- under
:lang
, add(haskell +lsp)
Then run:
cd ~/.emacs.d
bin/doom sync
To configure to run stylish-haskell on save, add this to ~/.doom.d/config.el
-
(setq haskell-stylish-on-save t)
Finally, restart your emacs for the changes to be applied.
I did have issues when just doing the later part. After doing both and running
doom upgrade
it magically worked despite nothing else we tried working, so you are probably right.The instructions on the hls README might need to be updated to include this as well.