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
@@ -207,7 +208,7 @@ The script will install the executables `haskell-language-server-wrapper` and `h
207
208
It will copy the latter appending the used ghc version, needed by the wrapper to choose the suitable version
208
209
for the project at hand.
209
210
210
-
So installing the executables directly with `stack install` or `cabal v2-install` may not be enough
211
+
So installing the executables directly with `stack install` or `cabal v2-install` may not be enough
211
212
for it to work properly.
212
213
213
214
Install haskell-language-server for the latest available and supported GHC version (and hoogle docs):
@@ -253,6 +254,28 @@ If your desired ghc has been found, you use it to install haskell-language-serve
253
254
./cabal-hls-install data
254
255
```
255
256
257
+
## HLS LSP Configuration
258
+
259
+
haskell-language-server supports some forms of configuration.
260
+
261
+
This configuration is done via the LSP settings you provide with your editor and/or LSP client.
262
+
Some examples include:
263
+
* in VSCode/VSCodium this is done via the `Settings` tab
264
+
* with `LanguageClient-neovim` you can point the [`g:LanguageClient_settingsPath`](https://github.com/autozimu/LanguageClient-neovim/blob/0e5c9546bfddbaa2b01e5056389c25aefc8bf989/doc/LanguageClient.txt#L221)
265
+
variable to the file in which you want to keep your LSP settings
266
+
267
+
### Formatting providers
268
+
##### Raw LSP key name: `haskell.formattingProvider`
269
+
270
+
By default, haskell-language-server is compiled with support for several different formatters.
271
+
272
+
These include
273
+
*`floskell`
274
+
*`fourmolu`
275
+
*`ormolu`
276
+
*`stylish-haskell`
277
+
*`brittany` (if compiled with AGPL)
278
+
256
279
## Project Configuration
257
280
258
281
**For a full explanation of possible configurations, refer to [hie-bios/README](https://github.com/mpickering/hie-bios/blob/master/README.md).**
@@ -567,7 +590,7 @@ This returns an error in HLS if 'tasty-discover' is not in the path: `could not
567
590
### Style guidelines
568
591
569
592
The project includes a [`.editorconfig`](https://editorconfig.org) [file](https://github.com/haskell/haskell-language-server/blob/master/.editorconfig) with the editor basic settings used by the project.
570
-
However, most editors will need some action to honour those settings automatically.
593
+
However, most editors will need some action to honour those settings automatically.
571
594
For example vscode needs to have installed a specific [extension](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig).
572
595
Please, try to follow those basic settings to keep the codebase as uniform as possible.
573
596
@@ -608,7 +631,7 @@ If you want to test HLS while hacking on it, follow the steps below.
608
631
To do once:
609
632
- Open some codebase on which you want to test your hacked HLS in your favorite editor
610
633
- Configure this editor to use your custom HLS executable
611
-
- With Cabal:
634
+
- With Cabal:
612
635
- On Unix systems: `cabal exec which haskell-language-server`
613
636
- On Windows: `cabal exec where haskell-language-server`
614
637
- With Stack: `$(stack path --dist-dir)/build/haskell-language-server/haskell-language-server`
0 commit comments