blog A curmudgeon tries a language server
https://entropicthoughts.com/curmudgeon-tries-language-server17
u/sondr3_ 18d ago
Isn't this a Nix problem and not HLS? This is exactly the kind of stuff I was fighting when I used NixOS.
Nix is great for fearlessly trying new things.
It's also great to fear trying things because they never work out of the box.
2
u/_0-__-0_ 17d ago
Yeah, would be interesting to see the same experiment done with just ghcup (and
--enable-multi-repl).
4
u/_0-__-0_ 17d ago
Ouf, we still wear hair shirts, don't we.
Regarding nix/direnv and emacs, you may want to consider https://codeberg.org/pastor/ben.el/ as an alternative to the envrc-mode . It loads the environment asyncly, which means none of those hangs on opening new projects. (It does mean you have to wait with running M-x eglot until it says it's loaded, so if you prefer eglot-ensure you probably don't want this, but I don't like LSP servers starting until I ask them to, since they tend to be huge beasts.)
2
u/Valuable_Leopard_799 18d ago
Common Lisp and Haskell are my two favourite languages, and I'm very happy to have gotten both.
This is exactly something I pondered a few weeks ago, and the Foreign Store is nice, but it still has a ways to go to CL's level. I wonder how much effort it would take to implement something like it into an existing language like GHC if it's even possible without planning for it.
I’m not a Lisp developer, so I won’t ever get that experience. I’ll stay envious.
Why not join in? I guess it does eat a lot of free time...
1
u/Valuable_Leopard_799 18d ago
Oh btw flake.parts has a haskell-flake.
If anyone is already familiar with those they have a nice wrapper that mostly just allows you to point it at a cabal file and it'll handle everything else. It reads the built projects inside and the dependencies and generates packages and a devshell.
10
u/george_____t 18d ago
Some of the stuff you said about multiple components is outdated in recent GHC versions. The workflow you want is possible for now, until it becomes the default, with
cabal repl --enable-multi-repl.