Merge pull request #92 from haskell/project-config-readme

Clarify difference between lsp and hie-bios configuration
This commit is contained in:
Luke Lau 2019-12-20 20:23:16 +00:00 committed by GitHub
commit bfedd0300f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ we talk to clients.__
- [Install specific GHC Version](#install-specific-ghc-version)
- [Multiple versions of HIE (optional)](#multiple-versions-of-hie-optional)
- [Configuration](#configuration)
- [Explicit Configuration](#explicit-configuration)
- [Project Configuration](#project-configuration)
- [Editor Integration](#editor-integration)
- [Using HIE with VS Code](#using-hie-with-vs-code)
- [Using VS Code with Nix](#using-vs-code-with-nix)
@ -307,13 +307,23 @@ There are some settings that can be configured via a `settings.json` file:
- VS Code: These settings will show up in the settings window
- LanguageClient-neovim: Create this file in `$projectdir/.vim/settings.json` or set `g:LanguageClient_settingsPath`
## Explicit Configuration
## Project Configuration
**For a full explanation of possible configuration, we refer to [hie-bios/README](https://github.com/mpickering/hie-bios/blob/master/README.md).**
**For a full explanation of possible configurations, refer to [hie-bios/README](https://github.com/mpickering/hie-bios/blob/master/README.md).**
The user can place a `hie.yaml` file in the root of the workspace which
describes how to setup the environment. For example, to explicitly state
that you want to use `stack` then the configuration file would look like:
HIE will attempt to automatically detect your project configuration and set up
the environment for GHC.
| `cabal.project` | `stack.yaml` | `*.cabal` | Project selected |
|-----------------|--------------|-----------|------------------|
| ✅ | - | - | Cabal v2 |
| ❌ | ✅ | - | Stack |
| ❌ | ❌ | ✅ | Cabal (v2 or v1) |
| ❌ | ❌ | ❌ | None |
However, you can also place a `hie.yaml` file in the root of the workspace to
**explicitly** describe how to setup the environment. For example, to state that
you want to use `stack` then the configuration file would look like:
```yaml
cradle: