@@ -46,6 +46,8 @@ This is *very* early stage software.
46
46
- [ Preprocessor] ( #preprocessor )
47
47
- [ Contributing] ( #contributing )
48
48
- [ It's time to join the project!] ( #its-time-to-join-the-project )
49
+ - [ Building haskell-language-server] ( #building-haskell-language-server )
50
+ - [ Hacking on haskell-language-server] ( #hacking-on-haskell-language-server )
49
51
50
52
## Features
51
53
@@ -551,7 +553,7 @@ This returns an error in HLS if 'tasty-discover' is not in the path: `could not
551
553
- Fork this repo and hack as much as you can.
552
554
- Ask @alanz or @hvr to join the project.
553
555
554
- # ## Hacking on haskell-language-server
556
+ # ## Building haskell-language-server
555
557
556
558
Haskell-language-server can be used on itself. We provide
557
559
preset samples of `hie.yaml` for Cabal and Stack.
@@ -577,3 +579,27 @@ $ stack build --test --no-run-tests
577
579
$ cd install
578
580
$ stack build
579
581
` ` `
582
+
583
+ # ## Hacking on haskell-language-server
584
+
585
+ # ### Introduction tutorial
586
+ Pepeiborra [wrote an tutorial](https://github.com/pepeiborra/hls-tutorial) on writing a plugin in HLS.
587
+
588
+ # ### Test your hacked HLS in your editor
589
+ If you want to test HLS while hacking on it, follow the steps below.
590
+
591
+ To do once :
592
+ - Open some codebase on which you want to test your hacked HLS in your favorite editor
593
+ - Configure this editor to use your custom HLS executable
594
+ - With Cabal :
595
+ - On Unix systems : ` cabal exec which haskell-language-server`
596
+ - On Windows : ` cabal exec where haskell-language-server`
597
+ - With Stack : ` $(stack path --dist-dir)/build/haskell-language-server/haskell-language-server`
598
+
599
+ To do every time you changed code and want to test it :
600
+ - Build HLS
601
+ - With Cabal : ` cabal build exe:haskell-language-server`
602
+ - With Stack : ` stack build haskell-language-server:exe:haskell-language-server`
603
+ - Restart HLS
604
+ - With VS Code : ` Haskell: Restart Haskell LSP Server`
605
+
0 commit comments