lspserver.completeItemsIsIncomplete = cItems.isIncomplete
endif
+ # Get the keyword prefix before the current cursor column.
+ var chcol = charcol('.')
+ var starttext = chcol == 1 ? '' : getline('.')[ : chcol - 2]
+ var [prefix, start_idx, end_idx] = starttext->matchstrpos('\k*$')
+ if opt.lspOptions.completionMatcher == 'icase'
+ prefix = prefix->tolower()
+ endif
+
+ var start_col = start_idx + 1
+
if opt.lspOptions.ultisnipsSupport
call UltiSnips#SnippetsInCurrentScope(1)
for [key, info] in items(g:current_ulti_dict_info)
+ if matchfuzzy([key], prefix)->empty()
+ continue
+ endif
var parts = split(info.location, ':')
var txt = readfile(parts[0])[str2nr(parts[1]) : str2nr(parts[1]) + 20]
var restxt = info.description .. "\n\n"
endfor
endif
- # Get the keyword prefix before the current cursor column.
- var chcol = charcol('.')
- var starttext = chcol == 1 ? '' : getline('.')[ : chcol - 2]
- var [prefix, start_idx, end_idx] = starttext->matchstrpos('\k*$')
- if opt.lspOptions.completionMatcher == 'icase'
- prefix = prefix->tolower()
- endif
-
- var start_col = start_idx + 1
-
#writefile([$'chcol = {chcol}, starttext = [{starttext}], prefix = [{prefix}], start_idx = {start_idx}, end_idx = {end_idx}, start_col = {start_col}'], '/tmp/lspcomplete.log', 'a')
var completeItems: list<dict<any>> = []