Skip to content

Add plugin to format .cabal files #183

Closed
@jneira

Description

@jneira
Member

/cc @WillSewell

Activity

WillSewell

WillSewell commented on Jul 6, 2020

@WillSewell

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

fendor

fendor commented on Jul 6, 2020

@fendor
Collaborator

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

maoe commented on Jul 7, 2020

@maoe
Member

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

Avi-D-coder commented on Jul 7, 2020

@Avi-D-coder
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://github.com/Avi-D-coder/implicit-hie to support common stanza!

added a commit that references this issue on Dec 27, 2020
jneira

jneira commented on Mar 2, 2021

@jneira
MemberAuthor

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

ndmitchell commented on Mar 3, 2021

@ndmitchell
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 :)

7 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @jneira@maoe@WillSewell@ndmitchell@fendor

      Issue actions

        Add plugin to format .cabal files · Issue #183 · haskell/haskell-language-server