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
@@ -260,7 +264,7 @@ Direct installation from Hackage, while possible via `cabal install haskell-lang
260
264
Said command builds the `haskell-language-server` binary and installs it in the default Cabal binaries folder,
261
265
but the binary will only work with projects that use the same GHC version that built it.
262
266
263
-
The package can be found here on Hackage: https://hackage.haskell.org/package/haskell-language-server
267
+
The package can be found here on Hackage: <https://hackage.haskell.org/package/haskell-language-server>
264
268
265
269
## Configuring `haskell-language-server`
266
270
@@ -301,9 +305,9 @@ For example, `haskell-language-server` allows you to choose the formatting provi
301
305
This option obviously would not make sense for language servers for other languages, or even for other Haskell language servers (which need not even support formatting).
302
306
303
307
Here is a list of the additional settings currently supported by `haskell-language-server`, along with their setting key (you may not need to know this) and default:
308
+
304
309
- Formatting provider (`haskell.formattingProvider`, default `ormolu`): what formatter to use; one of `floskell`, `ormolu`, `fourmolu`, `stylish-haskell`, or `brittany` (if compiled with the brittany plugin)
305
310
- Format on imports (`haskell.formatOnImportOn`, default true): whether to format after adding an import
306
-
- Maximum number of problems to report (`haskell.maxNumberOfProblems`, default 100): the maximum number of problems the server will send to the client
307
311
- Diagnostics on change (`haskell.diagnosticsOnChange`, default true): (currently unused)
308
312
- Completion snippets (`haskell.completionSnippetsOn`, default true): whether to support completion snippets
309
313
- Liquid Haskell (`haskell.liquidOn`, default false): whether to enable Liquid Haskell support (currently unused until the Liquid Haskell support is functional again)
@@ -631,9 +635,11 @@ tracked in https://github.com/haskell/haskell-language-server/issues/176 and ori
631
635
As a workaround, you need to ensure the preprocessor is available in the path (install globally with Stack or Cabal, provide in `shell.nix`, etc.).
632
636
633
637
Example with `tasty-discover`:
638
+
634
639
```haskell
635
640
{-# OPTIONS_GHC -F -pgmF tasty-discover #-}
636
641
```
642
+
637
643
This returns an error in HLS if 'tasty-discover' is not in the path: `could not execute: tasty-discover`.
638
644
639
645
## Troubleshooting
@@ -642,7 +648,7 @@ This returns an error in HLS if 'tasty-discover' is not in the path: `could not
642
648
643
649
#### Difficulties with Stack and `Paths_` modules
644
650
645
-
These are known to be somewhat buggy at the moment: https://github.com/haskell/haskell-language-server/issues/478.
651
+
These are known to be somewhat buggy at the moment: <https://github.com/haskell/haskell-language-server/issues/478>.
646
652
This issue should be fixed in Stack versions >= 2.5.
647
653
648
654
#### Problems with dynamic linking
@@ -737,12 +743,15 @@ $ cabal build
737
743
If you are looking for a Nix expression to create haskell-language-server binaries, see https://github.com/haskell/haskell-language-server/issues/122
738
744
739
745
#### Introduction tutorial
746
+
740
747
Pepeiborra [wrote an tutorial](https://github.com/pepeiborra/hls-tutorial) on writing a plugin in HLS.
741
748
742
749
#### Test your hacked HLS in your editor
750
+
743
751
If you want to test HLS while hacking on it, follow the steps below.
744
752
745
753
To do once:
754
+
746
755
- Open some codebase on which you want to test your hacked HLS in your favorite editor
747
756
- Configure this editor to use your custom HLS executable
748
757
- With Cabal:
@@ -751,6 +760,7 @@ To do once:
751
760
- With Stack: `$(stack path --dist-dir)/build/haskell-language-server/haskell-language-server`
752
761
753
762
To do every time you changed code and want to test it:
763
+
754
764
- Build HLS
755
765
- With Cabal: `cabal build exe:haskell-language-server`
756
766
- With Stack: `stack build haskell-language-server:exe:haskell-language-server`
0 commit comments