From 7a7c0d109f8bd13679a5b0a4c40086360358b39d Mon Sep 17 00:00:00 2001 From: David Sissitka Date: Sat, 13 Jan 2018 06:16:54 -0500 Subject: [PATCH] Add Elixir support. --- README.md | 3 +++ plugin/defaults.vim | 9 +++++++++ 2 files changed, 12 insertions(+) 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