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
In this example output, the path would be `/home/user/.cabal/bin/haskell-language-server`.
156
+
157
+
- Open some codebase on which you want to test your local HLS in your favorite editor (it can also be the HLS codebase itself: see previous section for configuration)
158
+
- Configure this editor to use your custom HLS executable by using the path you obtained previously.
159
+
- Restart HLS in your project:
160
+
- With VS Code: Press `CTRL + Shift + P` and type `Haskell: Restart Haskell LSP Server`
161
+
- With Emacs: `lsp-workspace-restart`
142
162
143
-
- Open some codebase on which you want to test your hacked HLS in your favorite editor (it can also be HLS codebase itself: see previous section for configuration)
144
-
- Configure this editor to use your custom HLS executable
145
-
- With Cabal:
146
-
- On Unix systems: `cabal exec which haskell-language-server`
147
-
- On Windows: `cabal exec where haskell-language-server`
148
-
- With Stack: `$(stack path --dist-dir)/build/haskell-language-server/haskell-language-server`
163
+
##### VS Code
164
+
165
+
When using VS Code you can set up a test project to use a specific HLS executable:
149
166
150
-
To do every time you change HLS code and want to test it:
167
+
- If it doesn't already exist in your project directory, create a directory called `.vscode`.
168
+
- In the `.vscode` directory create a file called `settings.json` with the below contents. The path used here is the one obtained by using the `cabal` install command.
- Open some codebase on which you want to test your local HLS in your favorite editor (it can also be the HLS codebase itself: see previous section for configuration)
179
+
- Configure this editor to use your custom HLS executable
180
+
- To obtain the path to your local HLS executable: `$(stack path --dist-dir)/build/haskell-language-server/haskell-language-server`
151
181
152
182
- Build HLS
153
-
- With Cabal: `cabal build exe:haskell-language-server`
154
-
- With Stack: `stack build haskell-language-server:exe:haskell-language-server`
155
-
- Restart HLS
156
-
- With VS Code: `Haskell: Restart Haskell LSP Server`
0 commit comments