Update: This plugin may still work, but I have opted to use Neoformat instead. Thus, I have archived this repository.
Integrates with brittany so every time you save a Haskell source file it gets automatically prettified.
Simply using :%!brittany replaces your whole source file with an error message
from brittany when you happen to have a syntax error in your code. This
plugin manages that annoyance.
Note: If you prefer hindent use vim-hindent instead. Note: If you prefer stylish-haskell use vim-stylishask instead.
Compatible with Vundle, Pathogen, Vim-plug.
By default, vim-brittany will format your code automatically when saving a
Haskell source file, but you can use the :Brittany command at any time to
format the current file.
To apply brittany on a range, either write the range manually or visually
select the desired code and then invoke :Brittany.
Use :BrittanyEnable, :BrittanyDisable, :BrittanyToggle to enable, disable,
or toggle running brittany on save.
Trigger brittany when saving (default = 1):
g:brittany_on_save = 1Number of spaces per indentation (default = '', uses brittany default of 2):
g:brittany_indent = 2Max line length (default = '', uses brittany default of 80):
g:brittany_columns = 100Specify the path to the brittany executable (for example if you installed
brittany with stack build --copy-compiler-tool brittany)
g:brittany_command = "stack exec -- brittany"Credit for this goes to alx741, as this is essentially a search-and-replace of vim-hindent.