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

Add plugin to format .cabal files #183

Closed
jneira opened this issue Jun 29, 2020 · 7 comments · Fixed by #2047
Closed

Add plugin to format .cabal files #183

jneira opened this issue Jun 29, 2020 · 7 comments · Fixed by #2047
Labels
type: enhancement New feature or request

Comments

@jneira
Copy link
Member

jneira commented Jun 29, 2020

/cc @WillSewell

@WillSewell
Copy link

Or use cabal format, which I see as the "official" style.

@fendor
Copy link
Collaborator

fendor commented Jul 6, 2020

cabal-fmt does quite a bit more than cabal format, but I guess you are right that it is more official (although cabal-fmt is produced by a cabal maintainer).
Also, in my opinion the bigger issue, is that with tools such as stack, rules_haskell, and similar, we might not have cabal installed on the system. Maybe we can extend hls to have multiple cabal formatters as well?

@maoe
Copy link
Member

maoe commented Jul 7, 2020

Sadly cabal format expands common stanzas (haskell/cabal#5734) so I don't think it's suitable as a general auto-formatter.

@Avi-D-coder
Copy link
Collaborator

Off topic: Thanks for mentioning this!

Sadly cabal format expands common stanzas (haskell/cabal#5734) so I don't think it's suitable as a general auto-formatter.

I believe this is will allow https:/Avi-D-coder/implicit-hie to support common stanza!

pepeiborra pushed a commit that referenced this issue Dec 27, 2020
@jneira
Copy link
Member Author

jneira commented Mar 2, 2021

I wonder if handling of cabal config should live in its own lsp server, to not bloat hls with cabal related dependencies and features

@ndmitchell
Copy link
Collaborator

I imagine that eventually we'll want to do things like creating new modules and automatically adding them to Cabal, or marking whether a module is exposed or not at the top of the module and adjusting that quickly. That requires a sufficient level of integration with Cabal that I suspect eventually we'll have to become a Cabal LSP (and potentially a Stack LSP). That might be a decade away though :)

@jneira
Copy link
Member Author

jneira commented Oct 4, 2021

Related with other features request related with the interacion between hls and cabal:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants