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
-[Using HIE with VS Code](#using-hie-with-vs-code)
38
40
-[Using VS Code with Nix](#using-vs-code-with-nix)
39
41
-[Using HIE with Sublime Text](#using-hie-with-sublime-text)
40
42
-[Using HIE with Vim or Neovim](#using-hie-with-vim-or-neovim)
41
-
-[Coc](#Coc)
42
-
-[LanguageClient-neovim](#LanguageClient-neovim)
43
+
-[Coc](#coc)
44
+
-[LanguageClient-neovim](#languageclient-neovim)
43
45
-[vim-plug](#vim-plug)
44
46
-[Clone the LanguageClient-neovim repo](#clone-the-languageclient-neovim-repo)
45
47
-[Sample `~/.vimrc`](#sample-vimrc)
@@ -302,6 +304,100 @@ There are some settings that can be configured via a `settings.json` file:
302
304
- VS Code: These settings will show up in the settings window
303
305
- LanguageClient-neovim: Create this file in `$projectdir/.vim/settings.json` or set `g:LanguageClient_settingsPath`
304
306
307
+
## Explicit Configuration
308
+
309
+
**For a full explanation of possible configuration, we refer to [hie-bios/README](https://github.com/mpickering/hie-bios/blob/master/README.md).**
310
+
311
+
The user can place a `hie.yaml` file in the root of the workspace which
312
+
describes how to setup the environment. For example, to explicitly state
313
+
that you want to use `stack` then the configuration file would look like:
314
+
315
+
```yaml
316
+
cradle: {stack}
317
+
```
318
+
319
+
If you use `cabal` then you probably need to specify which component you want
320
+
to use.
321
+
322
+
```yaml
323
+
cradle:
324
+
cabal:
325
+
component: "lib:haskell-ide-engine"
326
+
```
327
+
328
+
Or you can explicitly state the program which should be used to collect
329
+
the options by supplying the path to the program. It is interpreted
330
+
relative to the current working directory if it is not an absolute path.
331
+
332
+
```yaml
333
+
cradle:
334
+
bios:
335
+
program: ".hie-bios"
336
+
```
337
+
338
+
The complete configuration is a subset of
339
+
340
+
```yaml
341
+
cradle:
342
+
cabal:
343
+
component: "optional component name"
344
+
stack:
345
+
bazel:
346
+
obelisk:
347
+
bios:
348
+
program: "program to run"
349
+
dependency-program: "optional program to run"
350
+
direct:
351
+
arguments: ["list","of","ghc","arguments"]
352
+
default:
353
+
none:
354
+
355
+
dependencies:
356
+
- someDep
357
+
```
358
+
359
+
There is also support for multiple cradles in a single `hie.yaml`. An example configuration for Haskell IDE Engine:
360
+
361
+
```yaml
362
+
cradle:
363
+
multi:
364
+
- path: ./test/dispatcher/
365
+
config:
366
+
cradle:
367
+
cabal:
368
+
component: "test:dispatcher-test"
369
+
- path: ./test/functional/
370
+
config:
371
+
cradle:
372
+
cabal:
373
+
component: "test:func-test"
374
+
- path: ./test/unit/
375
+
config:
376
+
cradle:
377
+
cabal:
378
+
component: "test:unit-test"
379
+
- path: ./hie-plugin-api/
380
+
config:
381
+
cradle:
382
+
cabal:
383
+
component: "lib:hie-plugin-api"
384
+
- path: ./app/MainHie.hs
385
+
config:
386
+
cradle:
387
+
cabal:
388
+
component: "exe:hie"
389
+
- path: ./app/HieWrapper.hs
390
+
config:
391
+
cradle:
392
+
cabal:
393
+
component: "exe:hie-wrapper"
394
+
- path: ./
395
+
config:
396
+
cradle:
397
+
cabal:
398
+
component: "lib:haskell-ide-engine"
399
+
```
400
+
305
401
## Editor Integration
306
402
307
403
Note to editor integrators: there is now a `hie-wrapper` executable, which is installed alongside the `hie` 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.
0 commit comments