1# Haskell
2
3Haskell support is available through the [Haskell extension](https://github.com/zed-extensions/haskell).
4
5- Tree-sitter: [tree-sitter-haskell](https://github.com/tree-sitter/tree-sitter-haskell)
6- Language Server: [haskell-language-server](https://github.com/haskell/haskell-language-server)
7
8## Installing HLS
9
10Recommended method to [install haskell-language-server](https://haskell-language-server.readthedocs.io/en/latest/installation.html) (HLS) is via [ghcup](https://www.haskell.org/ghcup/install/) (`curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
11`):
12
13```sh
14ghcup install hls
15which haskell-language-server-wrapper
16```
17
18## Configuring HLS
19
20If you need to configure haskell-language-server (hls) you can add configuration options to your Zed settings.json:
21
22```json
23{
24 "lsp": {
25 "hls": {
26 "initialization_options": {
27 "haskell": {
28 "formattingProvider": "fourmolu"
29 }
30 }
31 }
32 }
33}
34```
35
36See the official [configuring haskell-language-server](https://haskell-language-server.readthedocs.io/en/latest/configuration.html) docs for more options.
37
38If you would like to use a specific hls binary, or perhaps use [static-ls](https://github.com/josephsumabat/static-ls) as a drop-in replacement instead, you can specify the binary path and arguments:
39
40```json
41{
42 "lsp": {
43 "hls": {
44 "binary": {
45 "path": "static-ls",
46 "arguments": ["--experimentalFeatures"]
47 }
48 }
49 }
50}
51```