vim-polyglot/indent/elixir.vim

20 lines
468 B
VimL
Raw Permalink Normal View History

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