2019-03-04 03:28:35 -05:00
|
|
|
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'coffee-script') != -1
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2017-03-23 06:28:19 -04:00
|
|
|
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
|
|
|
|
|