mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 06:10:05 +08:00
20 lines
349 B
VimL
20 lines
349 B
VimL
|
|
for l:pattern in l:completer.patterns
|
|
if l:line =~# l:pattern
|
|
let s:completer = l:completer
|
|
while l:pos > 0
|
|
if l:line[l:pos - 1] =~# '{\|,\|\[\|\\'
|
|
\ || l:line[l:pos-2:l:pos-1] ==# ', '
|
|
let s:completer.context = matchstr(l:line, '\S*$')
|
|
return l:pos
|
|
else
|
|
let l:pos -= 1
|
|
endif
|
|
endwhile
|
|
return -2
|
|
endif
|
|
endfor
|
|
|
|
|
|
|