haskell-format-import
This is a neovim plugin that formats your Haskell import statements, and it is itself written in Haskell!
How
Features
- Sorts alphabetically
- Aligns on "qualified"
- Aligns on "as"
- Aligns on "()"
Install
- You will need to install nvim-hs.
- Then run
make
Then add the following code to your ~/.config/nvim/nvim.hs
file,
..
import qualified HaskellFormatImport as HFI
..
main = do
neovim defaultConfig
{ plugins = plugins defaultConfig ++ [ .., HFI.plugin ]
}
Usage
This plugin exposes the HaskellFormatImport
command which you could map some keybinding to, or invoke directly.
Tests
To run the tests you can run stack test