You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45-19Lines changed: 45 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@ This extension adds language support for [Haskell](https://haskell.org), powered
12
12
- Code completion
13
13
- Formatting via Brittany, Floskell, Ormolu or Stylish Haskell
14
14
-[Multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces) support
15
+
- Code evaluation (Haskell Language Server)
16
+
17
+

18
+
15
19
16
20
## Requirements
17
21
@@ -52,29 +56,29 @@ There are a few placeholders which will be expanded:
52
56
-`~`, `${HOME}` and `${home}` will be expanded into your users' home folder.
53
57
-`${workspaceFolder}` and `${workspaceRoot}` will expand into your current project root.
54
58
55
-
## Local documentation
56
-
57
-
Haskell Language Server can display Haddock documentation on hover and in code completion for your code if you have built your project with haddock enabled.
58
-
59
-
For Stack projects, in your project directory run
60
-
61
-
```bash
62
-
$ stack haddock --keep-going
63
-
```
64
-
65
-
For Cabal projects, run
59
+
## Haskell Language Server specifics
66
60
67
-
```bash
68
-
$ cabal build --haddock
69
-
```
61
+
### Local documentation
70
62
71
-
Or alternatively add the following to your `~/.cabal/config` or `cabal.config[.local]`
63
+
Haskell Language Server can display Haddock documentation on hover and completions if the project and
64
+
its dependencies have been built with the `-haddock` GHC flag.
72
65
73
-
```json
74
-
documentation: True
75
-
```
66
+
- For cabal:
67
+
- Add to your global config file (e.g. `~/.cabal/config`):
68
+
```
69
+
program-default-options
70
+
ghc-options: -haddock
71
+
```
72
+
- Or, for a single project, run `cabal configure --ghc-options=-haddock`
76
73
77
-
## Haskell Language Server specifics
74
+
- For stack, add to global `$STACK_ROOT\config.yaml`, or project's `stack.yaml`:
75
+
```
76
+
ghc-options:
77
+
"$everything": -haddock
78
+
```
79
+
Note that this flag will cause compilation errors if a dependency contains invalid Haddock markup,
80
+
until GHC 8.12 which [will report warnings](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2377)
81
+
instead.
78
82
79
83
### Downloaded binaries
80
84
@@ -103,6 +107,28 @@ These are the versions of GHC that there are binaries of `haskell-language-serve
103
107
104
108
If you are using Haskell IDE Engine as your language server, there are a number of additional configuration options.
105
109
110
+
### Local documentation
111
+
112
+
Haskell Language Server can display Haddock documentation on hover and in code completion for your code if you have built your project with haddock enabled.
113
+
114
+
For Stack projects, in your project directory run
115
+
116
+
```bash
117
+
$ stack haddock --keep-going
118
+
```
119
+
120
+
For Cabal projects, run
121
+
122
+
```bash
123
+
$ cabal build --haddock
124
+
```
125
+
126
+
Or alternatively add the following to your `~/.cabal/config` or `cabal.config[.local]`
127
+
128
+
```json
129
+
documentation: True
130
+
```
131
+
106
132
### Liquid Haskell
107
133
108
134
If Liquid Haskell is installed, haskell-ide-engine can be configured to run the `liquidhaskell` executable on save and display diagnostics:
0 commit comments