Skip to content

Commit 239e6ff

Browse files
committed
add editor integration section
1 parent 0d5c5d4 commit 239e6ff

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,46 @@ dependencies:
267267
- someDep
268268
```
269269

270+
## Editor Integration
271+
272+
Note to editor integrators: there is now a haskell-language-server-wrapper executable, which is installed alongside the haskell-language-server executable. When this is invoked in the project root directory, it attempts to work out the GHC version used in the project, and then launch the matching hie executable.
273+
274+
All of the editor integrations assume that you have already installed HLS (see above) and that stack put the hls binary in your path (usually ~/.local/bin on linux and macOS).
275+
276+
### Using HLS with Emacs
277+
278+
Install HLS along with the following emacs packages:
279+
280+
[lsp-mode](https://github.com/emacs-lsp/lsp-mode)
281+
[lsp-ui](https://github.com/emacs-lsp/lsp-ui)
282+
[lsp-haskell](https://github.com/emacs-lsp/lsp-haskell)
283+
284+
Make sure to follow the instructions in the README of each of these packages.
285+
286+
``` lisp
287+
(setq lsp-haskell-process-path-hie "haskell-language-server-wrapper")
288+
```
289+
290+
291+
292+
### Using HLS with [doom-emacs](https://github.com/hlissner/doom-emacs/tree/develop/modules/lang/haskell#module-flags)
293+
294+
Install HLS, and then enable haskell lang module with lsp flag in `.doom.d/init.el`
295+
``` emacs-lisp
296+
:lang
297+
(haskell +lsp)
298+
```
299+
300+
in your `.doom.d/config.el` file
301+
302+
``` emacs-lisp
303+
(after! lsp-haskell
304+
(setq lsp-haskell-process-path-hie "haskell-language-server-wrapper")
305+
)
306+
```
307+
308+
then do `$HOME/.emacs.d/bin/doom refresh`
309+
270310
## Contributing
271311

272312
### It's time to join the project!

0 commit comments

Comments
 (0)