dmjio / miso

:ramen: A tasty Haskell front-end framework
https://haskell-miso.org
BSD 3-Clause "New" or "Revised" License
2.19k stars 139 forks source link

Miso setup with vscode haskell-language-server #628

Closed clojj closed 3 years ago

clojj commented 4 years ago

Is it possible to provide the following ?

Open vscode in sample-app-jsaddle directory and have haskell-language-server plugin (vscode) working... so having refactorings, type docs, Go To definition etc.

Other nix enabled project with ghcjs have managed to ship with a setup for vscode + hls. So I wonder, if it is possible with miso too ? This would be a boost for getting people started with miso apps.

smelc commented 4 years ago

This works for me: nix-shell --run 'code .' (within the sample-app-jsaddle directory).

I'm using code provided by snap on Ubuntu 20.04 and an instance of haskell-language-server downloaded automatically by the corresponding extension.

Note that right now, there are no refactorings available; but go to definition works as well as as-you-type feedback from the compiler.

clojj commented 4 years ago

great news.. let me try this on my machine thx for the update

clojj commented 4 years ago

Great, it is working ! if this message is ok ? miso-vscode-nix

smelc commented 4 years ago

Yes this is fine. That's because the sample-app-jsaddle doesn't have a hie.yaml file describing the code's components. But in this case haskell-language-server will infer the correct defaults.

clojj commented 4 years ago

I will have to look at jsaddle and see, if I can get a more bare-bones template going...