Skip to content

Commit 0ba38d5

Browse files
committed
Improve the emacs instructions a little
Make them instructions a little more detailed and consistent, add a section on spacemacs.
1 parent 4772884 commit 0ba38d5

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

README.md

+27-10
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ background](https://neilmitchell.blogspot.com/2020/01/one-haskell-ide-to-rule-th
4040
- [Sample `~/.vimrc`](#sample-vimrc)
4141
- [Atom](#using-haskell-language-server-with-atom)
4242
- [Emacs](#using-haskell-language-server-with-emacs)
43-
- [Doom emacs](#using-haskell-language-server-with-doom-emacs)
43+
- [Doom emacs](#using-haskell-language-server-with-doom-emacs)
44+
- [Spacemacs](#using-haskell-language-server-with-spacemacs)
4445
- [Kakoune](#using-haskell-language-server-with-kakoune)
4546
- [Known limitations](#known-limitations)
4647
- [Preprocessor](#preprocessor)
@@ -515,33 +516,49 @@ $ apm install language-haskell atom-ide-ui haskell
515516

516517
### Using haskell-language-server with Emacs
517518

518-
Install HLS along with the following emacs packages:
519+
Emacs support is provided by a combination of the following packages:
519520

520521
[lsp-mode](https://github.com/emacs-lsp/lsp-mode)
521522
[lsp-ui](https://github.com/emacs-lsp/lsp-ui)
522523
[lsp-haskell](https://github.com/emacs-lsp/lsp-haskell)
523524

524-
Make sure to follow the instructions in the README of each of these packages.
525+
You can install these manually if you are using plain Emacs; instructions for some specific flavours
526+
are included below.
525527

526-
The default `lsp-haskell-server-path` is set to `haskell-language-server-wrapper`. In
527-
case you would like your editor to use a specific version of the `hls` server, then this
528-
variable can be updated. Information on other configurations can be found at
529-
[lsp-haskell](https://github.com/emacs-lsp/lsp-haskell)
528+
Make sure to check the READMEs of each of these packages, which explain how to configure the
529+
various parts of the Emacs integration.
530+
In particular, `lsp-haskell` provides customization options for the `haskell-language-server`-specific parts,
531+
such as the path to the server binary.
530532

531-
### Using haskell-language-server with [doom-emacs](https://github.com/hlissner/doom-emacs/tree/develop/modules/lang/haskell#module-flags)
533+
#### Using haskell-language-server with [doom-emacs](https://github.com/hlissner/doom-emacs/tree/develop/modules/lang/haskell#module-flags)
532534

533-
Install haskell-language-server, and then enable the lsp module and the haskell lang module with lsp flag in `.doom.d/init.el`:
535+
Manual installation of packages is not required.
536+
Enable the lsp module and the haskell lang module with lsp flag in `.doom.d/init.el`:
534537

535538
``` emacs-lisp
536539
:tools
537540
lsp
538-
;;...
541+
;; ...
539542
:lang
540543
(haskell +lsp)
541544
```
542545

543546
then do `$HOME/.emacs.d/bin/doom sync`
544547

548+
#### Using haskell-language-server with [Spacemacs](https://github.com/syl20bnr/spacemacs)
549+
550+
Manual installation of packages is not required.
551+
Enable the `haskell` layer and the `lsp` layer in your Spacemacs config file:
552+
553+
```emacs-lisp
554+
dotspacemacs-configuration-layers
555+
'(
556+
haskell
557+
lsp
558+
;; ...
559+
)
560+
```
561+
545562
### Using haskell-language-server with [Kakoune](https://github.com/mawww/kakoune)
546563

547564
1. Grab a copy of [kak-lsp](https://github.com/ul/kak-lsp), and follow the setup instructions.

0 commit comments

Comments
 (0)