This commit is contained in:
Adam Stankiewicz
2022-02-17 04:31:35 +01:00
parent 2c5af8f89d
commit b77c5f1107
42 changed files with 1855 additions and 1187 deletions

View File

@@ -56,7 +56,17 @@ function! unison#Complete(findstart, base) abort
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
while start > 0 && line[start - 1] !~ '\s' && line[start - 1] != '(' && line[start - 1] != ')'
" Examples of where we want to count the start of a word:
"
" foo List.fold<cursor>
" ^
"
" {Abor<cursor>
" ^
"
" (List.fol<cursor>
" ^
while start > 0 && line[start - 1] !~ '\v\s|[(){}\[\]]'
let start -= 1
endwhile
return start