I have a project that looks like this:
- my-project
- backend
- stack.yaml
- src
- ... a bunch of haskell files
- ... exe & test folders here too
- frontend
- ... an Elm frontend app
- flake.nix
- ... other files
When I open this in vscode (cd my-project && codium .
) and go to one of the haskell files I get some errors it cannot find packages.
However, when I first cd into the backend folder and then open code (cd my-project/backend && codium .
) then everything works perfectly.
So I think the HLS is just being started at the root and then not able to pick up the haskell project properly.
I tried adding "haskell.serverExtraArgs": "--cwd /home/theoddler/Dev/my-project/backend"
to my .vscode/.settings.json
file, but I get the same errors.
How do I fix this? Can I change the directory where the vscode plugin starts the HLS?