Update dependencies

This commit is contained in:
Adam Stankiewicz
2018-07-08 15:16:28 +02:00
parent 33f610feb7
commit 055f7710b6
38 changed files with 1313 additions and 868 deletions

View File

@@ -21,6 +21,8 @@ let s:cpo_save = &cpo
set cpo&vim
let s:skip_syntax = '\%(Comment\|String\)$'
let s:binding_open = '\%(\<let\>\|{\)'
let s:binding_close = '\%(\<in\>\|}\)'
let s:block_open = '\%({\|[\)'
let s:block_close = '\%(}\|]\)'
@@ -43,6 +45,23 @@ function! GetNixIndent()
let current_line = getline(v:lnum)
let last_line = getline(lnum)
if current_line =~ '^\s*in\>'
let save_cursor = getcurpos()
normal ^
let bslnum = searchpair(s:binding_open, '', s:binding_close, 'bnW',
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "StringSpecial$"')
call setpos('.', save_cursor)
return indent(bslnum)
endif
if last_line =~ ';$'
let bslnum = searchpair(s:binding_open, '', s:binding_close, 'bnW',
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "StringSpecial$"')
if bslnum != 0
let ind = indent(bslnum) + &sw
endif
endif
if last_line =~ s:block_open . '\s*$'
let ind += &sw
endif
@@ -51,6 +70,10 @@ function! GetNixIndent()
let ind -= &sw
endif
if last_line =~ '[(=]$'
let ind += &sw
endif
if last_line =~ '\<let\s*$'
let ind += &sw
endif