mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
20 lines
472 B
VimL
20 lines
472 B
VimL
if polyglot#init#is_disabled(expand('<sfile>:p'), 'elixir', 'indent/elixir.vim')
|
|
finish
|
|
endif
|
|
|
|
if exists("b:did_indent")
|
|
finish
|
|
end
|
|
let b:did_indent = 1
|
|
|
|
setlocal indentexpr=elixir#indent(v:lnum)
|
|
|
|
setlocal indentkeys+==after,=catch,=do,=else,=end,=rescue,
|
|
setlocal indentkeys+=*<Return>,=->,=\|>,=<>,0},0],0),>
|
|
|
|
" TODO: @jbodah 2017-02-27: all operators should cause reindent when typed
|
|
|
|
function! elixir#indent(lnum)
|
|
return elixir#indent#indent(a:lnum)
|
|
endfunction
|