| 24 Jan 2025 |
Profpatsch | kspatlas: I just use it with haskellPackages and it works just fine | 14:28:44 |
maralorn | Install hls this way: https://nixos.org/manual/nixpkgs/unstable/#haskell-language-server | 14:29:20 |
maralorn | i.e. just install pkgs.haskell-language-server | 14:30:00 |
Profpatsch | pkgs.mkShell { buildInputs = [ pkgs.cabal-install pkgs.haskell-language-server ] } | 14:30:03 |
Profpatsch | Then start vscode from within the nix-shell | 14:30:13 |
maralorn | But I have to say. I just gave it a quick google. That is wildliy underdocumented for nixos. | 14:30:37 |
maralorn | The docs of the VSCode docs basically do not mention that it works without ghcup. | 14:31:01 |
Profpatsch | maralorn: mainly cause I wouldn’t expect it to just work :P | 14:31:06 |
maralorn | * The docs of the VSCode extension basically do not mention that it works without ghcup. | 14:31:10 |
maralorn | And I wrote a manual section about the minuatiae of picking the right hls but editor config is left as an excercise to the reader. ^^ | 14:32:08 |
Alex | In reply to @profpatsch:augsburg.one maralorn: mainly cause I wouldn’t expect it to just work :P AFAIK none of the other LSP clients try to install HLS themselves when it isn't missing, so if anything VSCode's "recommended" method is strange to me.
I could see someone asking "what if I need a custom-built GHC to [do some extremely niche thing]? ghcup's one doesn't work" | 15:05:08 |
Alex | * AFAIK none of the other LSP clients try to install HLS themselves when it is missing, so if anything VSCode's "recommended" method is strange to me.
I could see someone asking "what if I need a custom-built GHC to [do some extremely niche thing]? ghcup's one doesn't work" | 15:05:17 |
alexfmpe | In reply to @maralorn:maralorn.de And I wrote a manual section about the minuatiae of picking the right hls but editor config is left as an excercise to the reader. ^^ Been using vscode on the mac via home manager | 16:01:07 |
alexfmpe | Is nice | 16:01:12 |
alexfmpe | Never used ghcup | 16:02:11 |
alexfmpe | I just tell HLS to take it from PATH and nix shell on the relevant project | 16:02:34 |
Profpatsch | alex: It’s a pretty good default to install GHC if it’s missing imho | 16:23:17 |
Profpatsch | that’s what ghcup is for after all | 16:23:23 |
Profpatsch | on an average Ubuntu that probably works | 16:23:39 |
chreekat | Why did I only just now learn that cabal2nix https://path-to-commit.zip does exactly what it should do 😩 | 16:26:11 |
maralorn | Opinions whether it should actually do that differ. 😄 | 17:03:11 |
chreekat | i don't wanna know :D | 17:06:19 |
chreekat | But I do wanna know how to ... do the thing... I have done a dozen times.... and override packages down in the dependency tree | 17:08:54 |
maralorn | overrideScope? | 17:12:35 |
chreekat | never used it before | 17:18:22 |
chreekat | nah I need the haskellPackages.override thing I think | 17:24:05 |
tobz619 | In reply to @alexfmpe:matrix.org I just tell HLS to take it from PATH and nix shell on the relevant project does this work over different ghc versions? | 17:26:22 |
chreekat | tobz619: nah, you need to pull hls and ghc from the same nixpkgs pin for them to work together | 17:40:55 |
maralorn | chreekat: That’s true. But a sensible nix-shell will do exactly that. So yeah, tobz619 That totally works for different ghc versions. | 17:42:31 |
maralorn | Huh, maybe a misunderstanding. I am pretty sure alexfmpe meant to set the PATH with the HLS via the nix-shell. | 17:43:40 |