stylish-haskell icon indicating copy to clipboard operation
stylish-haskell copied to clipboard

New option for `list_align` for imports

Open vrom911 opened this issue 5 years ago • 0 comments

For example I would like to format imports as follows:

import qualified Network.HTTP.Client.Internal.Types as Client (Request, host, method, path, port,
    queryString, requestBody, requestHeaders)

But with current options, I can make it look either like this

import qualified Network.HTTP.Client.Internal.Types as Client (Request, host, method, path, port,
                                                               queryString, requestBody,
                                                               requestHeaders)

or like this:

import qualified Network.HTTP.Client.Internal.Types as Client 
    (Request, host, method, path, port, queryString, requestBody, requestHeaders)

or

import qualified Network.HTTP.Client.Internal.Types as Client (Request, host, method, path, port,
                                                    queryString, requestBody,
                                                    requestHeaders)

None of the existing solutions satisfies what I would like to see. Is it possible to add the option to align imports lines with fixed indentation not depending on the module name length (but also not to start with the new line each time even for 1-line imports)?

vrom911 avatar Sep 06 '18 07:09 vrom911