haskell-vim-now
haskell-vim-now copied to clipboard
Add new plugins
- Refactoring tool HaRe
- Vim-hsimport which will write import semiautomatically
- use to sort the import statements vim-haskell-sort-import
hindent can sort imports and v5.2.3 can sort explicit import lists.
What's your opinion of https://github.com/lspitzner/brittany as a replacement for hindent?
brittany is nice but it's novelty shows from some local testing. It choked on some Template Haskell and some tuple sections, even with the relevant ghc options passed in via config.yaml. It also doesn't deal with "data-decls, classes, instances, imports/exports", so hindent is a more batteries-included package right now.
Does seem to have smarter newline wrapping though:
From Hindent:
userResetRequest :: Request
userResetRequest =
baseRequest & setRequestPath "/ToolNavigation.asp" &
setRequestBodyURLEncoded
[ ("FactoryDefaultConfirm", "0")
, ("RestoreDefaultsNo", "0x00")
, ("UserResetYes", "0x01")
]
From brittany:
userResetRequest :: Request
userResetRequest =
baseRequest & setRequestPath "/ToolNavigation.asp" & setRequestBodyURLEncoded
[ ("FactoryDefaultConfirm", "0")
, ("RestoreDefaultsNo" , "0x00")
, ("UserResetYes" , "0x01")
]
The showcase output compared to hindent is more pleasing to me too: https://github.com/lspitzner/brittany/blob/71d7abc00793681fba056040fd38c65c6abb8b94/Showcase.md
brittany uses ghc-exactPrint while hindent uses haskell-src-exts, which in the long run will likely give brittany the upper hand. I don't feel it's ready for prime time yet though.
Brittany is now on Stackage. So if/when we want to switch to it, should be easy to do.
Nice! :tada: Would be good to test out brittany again.