Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ This is *very* early stage software.
- [Install via cabal](#install-via-cabal)
- [Install specific GHC Version](#install-specific-ghc-version)
- [Project Configuration](#project-configuration)
- [Editor Integration](#editor-integration)
- [Contributing](#contributing)
- [It's time to join the project!](#its-time-to-join-the-project)

Expand Down Expand Up @@ -267,6 +268,56 @@ dependencies:
- someDep
```

## Editor Integration

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 haskell-language-server executable.

All of the editor integrations assume that you have already installed haskell-language-server (see above) and that the installation script put the haskell-language-server binary in your path (usually ~/.local/bin on linux and macOS).

### Using haskell-language-server with Emacs

Install HLS along with the following emacs packages:

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

Make sure to follow the instructions in the README of each of these packages.

``` emacs-lisp
(use-package lsp-haskell
:ensure t
:config
(setq lsp-haskell-process-path-hie "haskell-language-server-wrapper")
;; Comment/uncomment this line to see interactions between lsp client/server.
;;(setq lsp-log-io t)
)
```



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

Install HLS, and then enable haskell lang module with lsp flag in `.doom.d/init.el`
``` emacs-lisp
:lang
(haskell +lsp)
```

in your `.doom.d/config.el` file

``` emacs-lisp
(use-package lsp-haskell
:ensure t
:config
(setq lsp-haskell-process-path-hie "haskell-language-server-wrapper")
;; Comment/uncomment this line to see interactions between lsp client/server.
;;(setq lsp-log-io t)
)
```

then do `$HOME/.emacs.d/bin/doom refresh`

## Contributing

### It's time to join the project!
Expand Down