Open kendfrey opened 3 years ago
This is not easily possible, since we need to launch the correct HLS version before a real Haskell file is opened. And the correct HLS version needs to know which ghc version you are using on the project, to launch a HLS version that has been compiled with the same ghc version.
A quick work-around is to add a top-level stack.yaml
file, e.g.
resolver: ... # Not sure if required
packages: ./my-haskell-app
with which we can detect the right tool.
@kendfrey have you got the opportunity of trying the suggested workaround?
@kendfrey have you got the opprtunity of try the suggested workaround?
No I haven't used that workaround.
My project structure is such that my Haskell app is in a subfolder and not the project root. For example:
When I open vscode to my project root I get a message like this:
From what I can tell, it's trying to use the system GHC installation instead of stack. Opening the subfolder
my-haskell-app
in vscode gets it to download the correct version of haskell-language-server.The Haskell extension should work with stack projects that are not directly in vscode's workspace root directory.