@@ -249,11 +249,11 @@ function! copilot#Complete(...) abort
249249 endif
250250 let params = copilot#doc#Params ()
251251 if ! exists (' b:_copilot.params' ) || b: _copilot .params !=# params
252- let b: _copilot = {' params' : params, ' first ' :
253- \ copilot#Request (' getCompletions ' , params)}
252+ let b: _copilot = {' params' : params, ' cycling ' :
253+ \ copilot#Request (' getCompletionsCycling ' , params)}
254254 let g: _copilot_last = b: _copilot
255255 endif
256- let completion = b: _copilot .first
256+ let completion = b: _copilot .cycling
257257 if ! a: 0
258258 return completion.Await ()
259259 else
@@ -410,7 +410,6 @@ endfunction
410410
411411function ! s: ClearPreview () abort
412412 if exists (' *nvim_buf_del_extmark' )
413- call nvim_buf_del_extmark (0 , copilot#NvimNs (), 1 )
414413 endif
415414endfunction
416415
@@ -444,8 +443,6 @@ function! s:UpdatePreview() abort
444443 let data.virt_text += annot
445444 endif
446445 let data.hl_mode = ' combine'
447- call nvim_buf_del_extmark (0 , copilot#NvimNs (), 1 )
448- call nvim_buf_set_extmark (0 , copilot#NvimNs (), line (' .' )-1 , col (' .' )-1 , data)
449446 if uuid !=# get (s: , ' uuid' , ' ' )
450447 let s: uuid = uuid
451448 call copilot#Request (' notifyShown' , {' uuid' : uuid})
@@ -471,7 +468,7 @@ function! s:Trigger(bufnr, timer) abort
471468 return
472469 endif
473470 if exists (' s:auth_request' )
474- let g: _copilot_timer = timer_start (100 , function (' s:Trigger' , [a: bufnr ]))
471+ let g: _copilot_timer = timer_start (50 , function (' s:Trigger' , [a: bufnr ]))
475472 return
476473 endif
477474 call copilot#Complete (function (' s:HandleTriggerResult' ), function (' s:HandleTriggerResult' ))
@@ -488,7 +485,7 @@ function! copilot#Schedule(...) abort
488485 if ! s: is_mapped || ! s: dest || ! copilot#Enabled ()
489486 return
490487 endif
491- let delay = a: 0 ? a: 1 : get (g: , ' copilot_idle_delay' , 75 )
488+ let delay = a: 0 ? a: 1 : get (g: , ' copilot_idle_delay' , 50 )
492489 let g: _copilot_timer = timer_start (delay, function (' s:Trigger' , [bufnr (' ' )]))
493490endfunction
494491
0 commit comments