Skip to content

Commit ab0c645

Browse files
committed
contributing: upd section "Using HLS on HLS code"
1 parent 83a001c commit ab0c645

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

docs/contributing/contributing.md

+15-10
Original file line numberDiff line numberDiff line change
@@ -113,22 +113,27 @@ $ cabal run haskell-language-server:func-test -- -p "hlint enables"
113113

114114
## Using HLS on HLS code
115115

116-
[HLS project configuration guidelines](../configuration.md#configuring-your-project-build) also apply to the HLS project itself.
116+
Generally, project now should work without any `hie.yaml` configuration placed.
117117

118-
Note: HLS implicitly detects HLS codebase as a Stack project (see [hie-bios implicit configuration documentation](https://github.com/haskell/hie-bios/blob/master/README.md#implicit-configuration)).
119-
If you want HLS to use Cabal, you need to create an `hie.yaml` file:
118+
In other cases:
119+
1. If there are `hie.yaml` (& `hie.yml`) files - try to backup them, remove & load project without them.
120+
2. Note that many subdirectories of a project are in itself are subprojects, & if main project needs special configuration - they need be hooked-up also.
121+
122+
In implicit configuration detection does not work & to create a mock configuration for all projects - use [implicit-hie](https://github.com/Avi-D-coder/implicit-hie) generator directly to put configuration explicitly - it would add configuarations for all projects at once by:
123+
```shell
124+
gen-hie > hie.yaml # into the main HLS directory
125+
```
126+
that configuration now can be inspected, it may work out of the box or can be tuned further with custom configuration.
127+
128+
[Configuring project build](../configuration.md#configuring-your-project-build) applies to HLS project source code loading just as to any other.
129+
130+
Note: HLS implicitly can detect HLS codebase as a Stack project (see [hie-bios implicit configuration documentation](https://github.com/haskell/hie-bios/blob/master/README.md#implicit-configuration)).
131+
If you want HLS to use Cabal, try to create an `hie.yaml` file:
120132
```yaml
121133
cradle:
122134
cabal:
123135
```
124136
125-
Also note that many subdirectories of a project are in itself are subprojects, so if you want to work on this part of the code, you may also have to create an `hie.yaml` files where `cabal` files reside.
126-
127-
Frequently [implicit-hie](https://github.com/Avi-D-coder/implicit-hie) project helps by generating configuration for all projects by:
128-
```shell
129-
gen-hie > hie.yaml # into the main HLS directory
130-
```
131-
that whould generate 1 file with a tree of configuration for all projects, that configuration may work as is or be tuned further with custom configuration.
132137
133138
### Manually testing your hacked HLS
134139
If you want to test HLS while hacking on it, follow the steps below.

0 commit comments

Comments
 (0)