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

Cannot format .cabal files with HLS 1.9 #791

Closed
openingnow opened this issue Dec 29, 2022 · 3 comments
Closed

Cannot format .cabal files with HLS 1.9 #791

openingnow opened this issue Dec 29, 2022 · 3 comments
Labels
type: bug A bug or unintended effect

Comments

@openingnow
Copy link

openingnow commented Dec 29, 2022

Your environment

Which OS do you use: Arch(WSL2) GHC 9.2.5 HLS 1.9.0.0 | Oracle linux aarch64 GHC 9.2.5, 9.4.4 HLS 1.9.0.0
all installed with ghcup

Steps to reproduce

  1. open foo.cabal file
  2. Press alt+shift+f to format

Expected behaviour

Format document with cabal-fmt plugin haskell/haskell-language-server#2047

Actual behaviour

Popup window saying There is no formatter for 'cabal' files installed.

$ haskell-language-server-wrapper --version
haskell-language-server version: 1.9.0.0 (GHC: 9.4.4) (PATH: /home/opc/.ghcup/hls/1.9.0.0/lib/haskell-language-server-1.9.0.0/bin/haskell-language-server-wrapper)
$ haskell-language-server-wrapper --list-plugins 2>&1 | grep cabalfmt
cabalfmt
@fendor
Copy link
Collaborator

fendor commented Dec 29, 2022

Hi!
While support is indeed advertised, vscode doesn't work with it yet, it requires the PR #618 and a release.
However, that isn't trivial because then suddenly vscode doesn't properly work with older HLS versions (if you do require so).
Haven't figured out the best way forward, maybe making a pre-release with #618, and telling everybody to switch if they understand the implications. Does this seem fine to you?

However, I am not available for implementing features for the next two weeks, so it will have to rest until then. If you have a good idea and time to implement it, happy to merge it.

@fendor fendor added type: bug A bug or unintended effect and removed status: needs triage labels Dec 29, 2022
@openingnow
Copy link
Author

Didn't know that related PR exists. Feel free to close this if it seems duplicated.

IMHO making a pre-release would be fine as it needs explicit participation.

@openingnow
Copy link
Author

Now works fine with pre-release 2.5.0, although external installation is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A bug or unintended effect
Projects
None yet
Development

No branches or pull requests

2 participants