haskell / haskell/stylish-haskell
Add option for imports.align: qualified-group
- Dominant language
- Haskell
- Stars
- 1k
- Forks
- 153
- PR merge metrics
- No merged PRs in 30d
Description
For a while we've been looking for a formatting style for import lists which reduces noise from whitespace changes when using Stylish-Haskell. Looking at the list of options available we've decided we'd like a combination of `global` and `group` which always inserts the indentation for the qualified keyword even if there is none in the file, but indents imports lists, hiding etc aligned within groups:
```haskell
import App.Thing.Database.Schema as Schema
import App.Thing.Handlers.Common
import Database.Beam as B
import App.Common.Utils
import Database.Beam.Backend.SQL.BeamExtensions
import Database.PostgreSQL.Simple (SqlError)
import Data.Text.Encoding (decodeUtf8)
import App.Common.Types as CT
import App.Thing.Types as BT
import Servant
import qualified Crypto.Scrypt as Scrypt
import Control.Lens
```
I wonder whether it's worth splitting the settings for how to handle `qualified` and import alignment into separate settings.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.