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
-[Download the source code](#download-the-source-code)
24
+
-[Building](#building)
25
+
-[Install via cabal](#install-via-cabal)
26
+
-[Install specific GHC Version](#install-specific-ghc-version)
27
+
-[Project Configuration](#project-configuration)
28
+
-[Contributing](#contributing)
29
+
-[It's time to join the project!](#its-time-to-join-the-project)
18
30
19
-
Initial effort is to understand how plugins can be supported in a modular way.
31
+
## Installation
20
32
21
-
Builds with stack and cabal, using GHC 8.6.5
33
+
For now only installation from source is supported.
34
+
35
+
### Installation from source
36
+
37
+
#### Common pre-requirements
38
+
39
+
-`stack` or `cabal` must be in your PATH
40
+
- You need stack version >= 2.1.1 or cabal >= 2.4.0.0
41
+
-`git` must be in your PATH
42
+
- The directory where `stack`or `cabal` put the binaries must be in you PATH:
43
+
- For stack you can get it with `stack path --local-bin`
44
+
- For cabal it is by default `$HOME/.cabal/bin` in linux and `%APPDATA%\cabal\bin` in windows.
45
+
46
+
Tip: you can quickly check if some command is in your path by running the command.
47
+
If you receive some meaningful output instead of "command not found"-like message
48
+
then it means you have the command in PATH.
49
+
50
+
#### Linux-specific pre-requirements
51
+
52
+
On Linux you will need install a couple of extra libraries (for Unicode ([ICU](http://site.icu-project.org/)) and [NCURSES](https://www.gnu.org/software/ncurses/)):
sudo dnf install libicu-devel ncurses-devel # also zlib-devel if not already installed
70
+
```
71
+
72
+
#### Windows-specific pre-requirements
73
+
74
+
In order to avoid problems with long paths on Windows you can do either one of the following:
75
+
76
+
1. Clone the `haskell-language-server` to a short path, for example the root of your logical drive (e.g. to
77
+
`C:\hls`). Even if you choose `C:\haskell-language-server` you could hit the problem. If this doesn't work or you want to use a longer path, try the second option.
78
+
79
+
2. If the `Local Group Policy Editor` is available on your system, go to: `Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Filesystem` set `Enable Win32 long paths` to `Enabled`. If you don't have the policy editor you can use regedit by using the following instructions [here](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#enable-long-paths-in-windows-10-version-1607-and-later). You also need to configure git to allow longer paths by using unicode paths. To set this for all your git repositories use `git config --system core.longpaths true` (you probably need an administrative shell for this) or for just this one repository use `git config core.longpaths true`.
80
+
81
+
In addition make sure `haskell-language-server.exe` is not running by closing your editor, otherwise in case of an upgrade the executable can not be installed.
If your desired ghc has been found, you use it to install haskell-language-server.
157
+
158
+
```bash
159
+
./cabal-hls-install hls-8.6.5
160
+
./cabal-hls-install data
161
+
```
162
+
163
+
## Project Configuration
164
+
165
+
**For a full explanation of possible configurations, refer to [hie-bios/README](https://github.com/mpickering/hie-bios/blob/master/README.md).**
166
+
167
+
haskell-language-server has some limited support via hie-bios to detect automatically
168
+
your project configuration and set up the environment for GHC.
169
+
The plan is to improve it to handle most use cases.
170
+
171
+
However, for now, the more reliable way is using a `hie.yaml` file in the root
172
+
of the workspace to **explicitly** describe how to setup the environment.
173
+
For that you need to know what *components* have your project and the path
174
+
associated with each one. So you will need some knowledge about
175
+
[stack](https://docs.haskellstack.org/en/stable/build_command/#components) or [cabal](https://cabal.readthedocs.io/en/latest/cabal-commands.html?#cabal-v2-build) components.
176
+
177
+
You also can use [this utility](https://github.com/Avi-D-coder/implicit-hie
178
+
) to generate automatically `hie.yaml` files for
179
+
the most common stack and cabal configurations
180
+
181
+
For example, to state that you want to use `stack` then the configuration file
182
+
would look like:
183
+
184
+
```yaml
185
+
cradle:
186
+
stack:
187
+
component: "haskell-language-server:lib"
188
+
```
189
+
190
+
If you use `cabal` then you probably need to specify which component you want
191
+
to use.
192
+
193
+
```yaml
194
+
cradle:
195
+
cabal:
196
+
component: "lib:haskell-language-server"
197
+
```
198
+
199
+
If you have a project with multiple components, you can use a cabal-multi
0 commit comments