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
Copy file name to clipboardExpand all lines: README.md
+55-2Lines changed: 55 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,14 @@ If you want to use `static-ls` in your IDE then
25
25
recommended alongside `-fdefer-type-errors flag` for better UX
26
26
and the [ghc hiedb plugin](https://github.com/josephsumabat/hiedb-plugin) for re-indexing.
27
27
28
-
Currently only ghc 9.4.4 and 9.6.1 are explicitly supported but I'm happy to add support for other versions of ghc if desired
28
+
Currently only ghc 9.4.4 and 9.6.1 are explicitly supported but I'm happy to add support for other versions of ghc if desired.
29
+
30
+
To install, it is recommended to build from source. It's important to build
31
+
`static-ls` with the same version of GHC that your project uses.
32
+
33
+
If you use nix, you can checkout the section below to see how to install
34
+
`static-ls` via nix flake.
29
35
30
-
(NOTE: The current version on hackage is out of date. Building from source is currently recommended.)
31
36
32
37
## Quick start
33
38
@@ -154,6 +159,33 @@ static-ls includes a `ghcid` subcommand which passes the appropriate flags to us
154
159
- Must be compiled on the same version of ghc as the project
155
160
- You will need to re-index your hie files once you edit your project
156
161
162
+
## Install with Nix
163
+
164
+
**IMPORTANT:** You must build `static-ls` with the same GHC version as your project. Using a different GHC version will result in compatibility issues with HIE files.
ghcVersion = "ghc963"; # Match your project's GHC version
182
+
};
183
+
};
184
+
}
185
+
```
186
+
187
+
Available GHC versions include: `ghc963`, `ghc981`, `ghc982`, `ghc945`, `ghc946`, etc. Check your nixpkgs for available versions.
188
+
157
189
## Editor setup
158
190
Instructions for editor setup
159
191
@@ -231,6 +263,27 @@ You can technically use any LSP compliant client - for a generic one we generall
231
263
:language-id "haskell"))
232
264
```
233
265
266
+
### Helix
267
+
Modify your `languages.toml` config file to add the following:
268
+
269
+
```toml
270
+
[[language]]
271
+
name = "haskell"
272
+
language-servers = ["haskell-static-ls"]
273
+
274
+
[language-server.haskell-static-ls]
275
+
command = "static-ls"
276
+
277
+
```
278
+
279
+
You can verify that it's configured properly and that `static-ls` is discoverable
280
+
by helix with `hx --health haskell`. You should see something like:
281
+
282
+
```sh
283
+
Configured language servers:
284
+
✓ haskell-static-ls: /path/to/static-ls
285
+
```
286
+
234
287
## Troubleshooting
235
288
### Slowdowns
236
289
Some editors watch all folders in your project directory for changes and report those to the LSP server. This might cause significant slowdown when `.hiefiles` or `.hifiles` are tracked (documented in #175).
0 commit comments