Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS support #28

Open
googleson78 opened this issue Mar 28, 2022 · 4 comments
Open

HLS support #28

googleson78 opened this issue Mar 28, 2022 · 4 comments

Comments

@googleson78
Copy link
Contributor

Does anyone developing this have a local HLS setup they're using? It seems like following https://rules-haskell.readthedocs.io/en/latest/haskell-use-cases.html#configuring-ide-integration-with-ghcide almost gets you there, but hls doesn't seem to be finding modules from the current package (e.g. I can't import CabalScan.Rules)

@kczulko
Copy link
Contributor

kczulko commented Mar 29, 2022

I think I've tried sth with this but I gave up. I don't remember exactly why :)

@kczulko
Copy link
Contributor

kczulko commented Mar 30, 2022

Small update:
Ok, I've tried this now but I wanted to take hls from the nix-shell instead of building ghcide with bazel (in the end we use ghc8107 from nixpkgs here and when I've tried with ghcide bazel build... It was failing). I ended up with broken hcg-minus-0.16 for the nixpkgs we're pinned to, which is what I'm trying to fix now.

Funny thing - I though that someone already fixed that: I'll try to use this https://github.com/morganthomas/hcg-minus

edit: Oh my God... I'm so stupid... hls /= haskell-language-server

@kczulko
Copy link
Contributor

kczulko commented Mar 31, 2022

@googleson78

I've tried this

This is what I've encountered:

  • I'm using emacs (vanilla one)
  • When I've opened any of hs files from gazelle_cabal emacs was getting hanged (3x C-g to get it alive)
  • Then I've entered nix-shell --pure where I've started haskell-language-server-wrapper (without any additional options).

After the last step, haskell-language-server-wrapper was processing files for more than 5hrs so I quit this process. I've observed that there were some errors but they only were related to .hs files from rules_haskell project (error msg was mentioning lack of //cabalscan:hie-bios target under rules_haskell project... so failure was looking obvious). For all other .hs files from all other dependencies, processing was looking good but it was terribly slow.

It looks like at least sth (lenses + code actions) is working in my case with this code (Options.hs file):
image

@aherrmann
Copy link
Member

aherrmann commented Apr 6, 2022

It's been a long time since I last looked into this. A work HLS setup and updated documentation would be most welcome! Unfortunately, I don't have a working setup with HLS myself. (Writing from the perspective of rules_haskell)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants