vim-polyglot/indent/elixir.vim

20 lines
468 B
VimL
Raw Normal View History

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'elixir') != -1
finish
endif
2017-05-17 05:07:28 -04:00
if exists("b:did_indent")
2013-09-12 11:31:56 -04:00
finish
2016-09-11 07:24:17 -04:00
end
2016-12-20 14:57:20 -05:00
let b:did_indent = 1
2013-09-12 11:31:56 -04:00
2017-05-17 05:07:28 -04:00
setlocal indentexpr=elixir#indent(v:lnum)
2017-09-27 13:57:29 -04:00
setlocal indentkeys+==after,=catch,=do,=else,=end,=rescue,
setlocal indentkeys+=*<Return>,=->,=\|>,=<>,0},0],0)
2017-05-17 05:07:28 -04:00
" TODO: @jbodah 2017-02-27: all operators should cause reindent when typed
function! elixir#indent(lnum)
2017-09-27 13:57:29 -04:00
return elixir#indent#indent(a:lnum)
2016-09-11 07:24:17 -04:00
endfunction