diff --git a/README.md b/README.md index 0a1ca15..9aad741 100644 --- a/README.md +++ b/README.md @@ -228,6 +228,9 @@ Here is a list of formatprograms that are supported by default, and thus will be * `fprettify` for modern __Fortran__. Download from [official repository](https://github.com/pseewald/fprettify). Install with `./setup.py install` or `./setup.py install --user`. +* `mix format` for __Elixir__. + `mix format` is included with Elixir 1.6+. + ## Help, the formatter doesn't work as expected! If you're struggling with getting a formatter to work, it may help to set vim-autoformat in diff --git a/plugin/defaults.vim b/plugin/defaults.vim index 9bd00f9..55eeee8 100644 --- a/plugin/defaults.vim +++ b/plugin/defaults.vim @@ -439,3 +439,12 @@ endif if !exists('g:formatters_fortran') let g:formatters_fortran = ['fprettify'] endif + +" Elixir +if !exists('g:formatdef_mix_format') + let g:formatdef_mix_format = '"mix format -"' +endif + +if !exists('g:formatters_elixir') + let g:formatters_elixir = ['mix_format'] +endif