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
+21-19Lines changed: 21 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,14 @@ This is the Visual Studio Code extension for the [Haskell programming language](
4
4
5
5
## Features
6
6
7
-
- Warning and error diagnostics
7
+
- Warning and error diagnostics from GHC
8
8
- Code actions and quick-fixes via [`apply-refact`](https://github.com/mpickering/apply-refact) (click the lightbulb)
9
9
- Type information and documentation on hover
10
-
- Jump to definition (`F12` or `Go to Definition` in the command palette)
11
-
-List all top level definitions
10
+
- Jump to definition
11
+
-Document symbols
12
12
- Highlight references in document
13
13
- Code completion
14
-
- Formatting via [`brittany`](https://github.com/lspitzner/brittany) (`^ ⌥ B`or `Format Document` in command palette)
14
+
- Formatting via Brittany, Floskell, Ormolu or Stylish Haskell
15
15
-[Multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces) support
16
16
17
17
## Requirements
@@ -75,35 +75,37 @@ There are a few placeholders which will be expanded:
75
75
-`~`, `${HOME}` and `${home}` will be expanded into your users' home folder.
76
76
-`${workspaceFolder}` and `${workspaceRoot}` will expand into your current project root.
77
77
78
-
## Docs on Hover/Generating Hoogle DB
78
+
## Local documentation
79
79
80
-
For the most current documentation on this, see [Docs on Hover/Completion](https://github.com/haskell/haskell-ide-engine#docs-on-hovercompletion).
80
+
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.
81
81
82
-
HIE supports fetching docs from haddock on hover. It will fallback on using a hoogle db(generally located in ~/.hoogle on linux)
83
-
if no haddock documentation is found.
84
-
85
-
To generate haddock documentation for stack projects:
82
+
For stack projects, in your project directory run
86
83
87
84
```bash
88
-
$ cd your-project-directory
89
85
$ stack haddock --keep-going
90
86
```
91
87
92
-
To enable documentation generation for cabal projects, add the following to your ~/.cabal/config
88
+
For cabal projects, run
89
+
90
+
```bash
91
+
$ cabal build --haddock
92
+
```
93
+
94
+
Or alternatively add the following to your `~/.cabal/config` or `cabal.config[.local]`
93
95
94
96
```json
95
97
documentation: True
96
98
```
97
99
98
-
To generate a hoogle database that hie can use
100
+
### Haskell IDE Engine and Hoogle
101
+
102
+
If you are using Haskell IDE Engine as the language server, it pulls in documentation via Hoogle. After installing Hoogle via `cabal install hoogle` or `stack install hoogle`, generate the database with:
99
103
100
104
```bash
101
-
$ cd haskell-ide-engine
102
-
$ stack --stack-yaml=<stack.yaml you used to build hie>exec hoogle generate
105
+
$ hoogle generate
103
106
```
104
107
105
-
For now `ghcide`and `haskell-language-server` have not that fallback to the hoogle database, so
106
-
you should generate haddock documentation as described above.
108
+
Haskell IDE Engine
107
109
108
110
## Manual Installation
109
111
@@ -141,11 +143,11 @@ This extension will download the language server binaries to a specific location
141
143
142
144
## Investigating and reporting problems
143
145
144
-
1. Go to extensions and right click `Haskell Language Server` and choose `Configure Extensions Settings`
146
+
1. Go to extensions and right click `Haskell` and choose `Configure Extensions Settings`
145
147
2. Scroll down to `Language Server Haskell › Trace: Server` and set it to `verbose`
146
148
3. Restart vscode and reproduce your problem
147
149
4. Go to the main menu and choose `View -> Output` (`Ctrl + Shift + U`)
148
-
5. On the new Output panel that opens on the right side in the drop down menu choose `Haskell HIE (cabal)`
150
+
5. On the new Output panel that opens on the right side in the drop down menu choose `Haskell`
149
151
150
152
Now you will see the information which you can use to diagnose or report a problem
0 commit comments