@@ -46,6 +46,8 @@ This is *very* early stage software.
4646 - [ Preprocessor] ( #preprocessor )
4747 - [ Contributing] ( #contributing )
4848 - [ 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 )
4951
5052## Features
5153
@@ -551,7 +553,7 @@ This returns an error in HLS if 'tasty-discover' is not in the path: `could not
551553- Fork this repo and hack as much as you can.
552554- Ask @alanz or @hvr to join the project.
553555
554- # ## Hacking on haskell-language-server
556+ # ## Building haskell-language-server
555557
556558Haskell-language-server can be used on itself. We provide
557559preset samples of `hie.yaml` for Cabal and Stack.
@@ -577,3 +579,27 @@ $ stack build --test --no-run-tests
577579$ cd install
578580$ stack build
579581` ` `
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