Files
vim-polyglot/indent/litcoffee.vim
2020-10-25 20:33:44 +01:00

27 lines
405 B
VimL

if !has_key(g:polyglot_is_disabled, 'coffee-script')
finish
endif
if exists('b:did_indent')
finish
endif
runtime! indent/coffee.vim
let b:did_indent = 1
setlocal indentexpr=GetLitCoffeeIndent()
if exists('*GetLitCoffeeIndent')
finish
endif
function GetLitCoffeeIndent()
if searchpair('^ \|\t', '', '$', 'bWnm') > 0
return GetCoffeeIndent(v:lnum)
else
return -1
endif
endfunc