Skip to content

Commit 89a5e12

Browse files
committed
Fix typos and markdown lints in surrounding docs
1 parent 722d05b commit 89a5e12

2 files changed

Lines changed: 45 additions & 29 deletions

File tree

.github/ISSUE_TEMPLATE/enhancement_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ assignees: ''
77

88
---
99

10-
## Is your enhancement request related to a problem? Please describe.
10+
## Is your enhancement request related to a problem? Please describe
1111

1212
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
1313

docs/contributing/contributing.md

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ The Haskell tooling dream is near, we need your help!
1111
## Building
1212

1313
Clone the repository:
14+
1415
```shell
15-
$ git clone https://github.com/haskell/haskell-language-server
16+
git clone https://github.com/haskell/haskell-language-server
1617
```
1718

18-
#### Note for contributors using WSL (Windows Subsystem for Linux)
19+
**Note** for contributors using WSL (Windows Subsystem for Linux)
1920

2021
When building HLS in WSL, clone and build the repository from the Linux filesystem (e.g. `~/dev`), not from Windows-mounted paths like `/mnt/c`, as this can cause permission or build issues.
2122

@@ -39,36 +40,37 @@ $ cabal build
3940
```
4041

4142
If you encounter memory-related build failures, try reducing peak memory usage by running:
42-
```
43+
44+
```shell
4345
cabal build -j1
4446
```
4547

4648
### Building with Stack
4749

4850
```shell
49-
$ stack build
51+
stack build
5052
```
5153

5254
### Building with Nix
5355

5456
The instructions below show how to set up a Cachix binary cache and open a Nix shell for local development.
5557

5658
```shell
57-
$ cachix use haskell-language-server
58-
$ nix-shell
59-
$ cabal update
60-
$ cabal build
59+
cachix use haskell-language-server
60+
nix-shell
61+
cabal update
62+
cabal build
6163
```
6264

6365
#### Flakes support
6466

6567
If you are using Nix 2.4 style commands (enabled by `experimental-features = nix-command`),
6668
you can use `nix develop` instead of `nix-shell` to enter the development shell. To enter the shell with specific GHC versions:
6769

68-
* `nix develop` - default GHC version,
69-
* `nix develop .#shell-ghc90` - GHC 9.0.1 (substitute GHC version as appropriate).
70+
- `nix develop` - default GHC version,
71+
- `nix develop .#shell-ghc90` - GHC 9.0.1 (substitute GHC version as appropriate).
7072

71-
If you are looking for a Nix expression to create `haskell-language-server` binaries, see https://github.com/haskell/haskell-language-server/issues/122
73+
If you are looking for a Nix expression to create `haskell-language-server` binaries, see <https://github.com/haskell/haskell-language-server/issues/122>
7274

7375
## Testing
7476

@@ -83,19 +85,19 @@ Other project packages, like the core library or plugins, can have their own tes
8385
Running all the tests
8486

8587
```bash
86-
$ cabal test
88+
cabal test
8789
```
8890

8991
Running just the functional tests
9092

9193
```bash
92-
$ cabal test func-test
94+
cabal test func-test
9395
```
9496

9597
Running just the wrapper tests
9698

9799
```bash
98-
$ cabal test wrapper-test
100+
cabal test wrapper-test
99101
```
100102

101103
Running just the tests for a specific plugin
@@ -113,14 +115,14 @@ Tasty supports providing
113115
line arguments, to select the specific tests to run.
114116

115117
```bash
116-
$ cabal test func-test --test-option "-p hlint"
118+
cabal test func-test --test-option "-p hlint"
117119
```
118120

119121
The above recompiles everything every time you use a different test option though.
120122
An alternative, which only recompiles when tests (or dependencies) change is to pass the `TASTY_PATTERN` environment variable:
121123

122124
```bash
123-
$ TASTY_PATTERN='hlint' cabal test func-test
125+
TASTY_PATTERN='hlint' cabal test func-test
124126
```
125127

126128
## Using HLS on HLS code
@@ -136,6 +138,7 @@ cradle:
136138
```
137139
138140
## Manually testing your hacked HLS
141+
139142
If you want to test HLS while hacking on it (you can even test it on HLS codebase itself, see previous section), you need to:
140143
141144
1. (Once) Find the path to the hacked HLS you build
@@ -144,18 +147,23 @@ If you want to test HLS while hacking on it (you can even test it on HLS codebas
144147
4. (Every time you change the HLS code) Restart the LSP workspace
145148
146149
### Find the path to your HLS build
150+
147151
Note that unless you change the GHC version or the HLS version between builds, the path should remain the same, this is why you need to set it only once.
148152
149153
#### Using Cabal
154+
150155
Run:
156+
151157
```shell
152158
$ cabal build exe:haskell-language-server && cabal list-bin exe:haskell-language-server
153159
[..]
154160
<some long path>/haskell-language-server
155161
```
156162

157163
#### Using Stack
164+
158165
Run:
166+
159167
```shell
160168
$ echo $(pwd)/$(stack path --dist-dir)/build/haskell-language-server/haskell-language-server
161169
[..]
@@ -165,33 +173,41 @@ $ echo $(pwd)/$(stack path --dist-dir)/build/haskell-language-server/haskell-lan
165173
### Configuring your editor to use your HLS build
166174

167175
#### Configuring VS Code
176+
168177
When using VS Code you can set up each project to use a specific HLS executable:
169178

170179
- If it doesn't already exist in your project directory, create a directory called `.vscode`.
171180
- In the `.vscode` directory create a file called `settings.json` with the below contents.
172-
```json
173-
{
174-
"haskell.serverExecutablePath": "/path/to/your/hacked/haskell-language-server"
175-
}
176-
```
181+
182+
```json
183+
{
184+
"haskell.serverExecutablePath": "/path/to/your/hacked/haskell-language-server"
185+
}
186+
```
177187

178188
#### Configuring Emacs
189+
179190
There are several ways to configure the HLS server path, each of which depends on your choice of language server provider (e.g., emacs-lsp or eglot). If using emacs-lsp, you need to configure the variable `lsp-haskell-server-path`:
191+
180192
- `M-x customize-group<RET>lsp-haskell<RET>Lsp Haskell Server Path`
181193
- Evaluate `(setq lsp-haskell-server-path "/path/to/your/hacked/haskell-language-server")`
182194
- Create a file `.dir-locals.el` with the following content:
183-
```lisp
184-
((haskell-mode . ((lsp-haskell-server-path . "/path/to/your/hacked/haskell-language-server"))))
185-
```
195+
196+
```lisp
197+
((haskell-mode . ((lsp-haskell-server-path . "/path/to/your/hacked/haskell-language-server"))))
198+
```
186199

187200
If using eglot, you need to configure the variable `eglot-server-programs`, which is an alist associating major-modes to executables:
201+
188202
- Evaluate `(setf (alist-get 'haskell-mode eglot-server-programs) ("/path/to/your/hacked/haskell-language-server" "--lsp"))`
189203
- Create a file `.dir-locals.el` with the following content:
190-
```lisp
191-
((haskell-mode . ((eglot-server-programs . (('haskell-mode . ("/path/to/your/hacked/haskell-language-server" "--lsp")))))))
192-
```
204+
205+
```lisp
206+
((haskell-mode . ((eglot-server-programs . (('haskell-mode . ("/path/to/your/hacked/haskell-language-server" "--lsp")))))))
207+
```
193208

194209
### Rebuild HLS
210+
195211
- With Stack: `stack build haskell-language-server:exe:haskell-language-server`
196212
- With Cabal: `cabal build exe:haskell-language-server`
197213

@@ -254,7 +270,7 @@ You need to install some Python prerequisites. You can either `pip install -r do
254270

255271
Then to build and preview the documentation:
256272

257-
```
273+
```sh
258274
cd docs
259275
make html
260276
firefox _build/html/index.html

0 commit comments

Comments
 (0)