cmp-fuzzy-path icon indicating copy to clipboard operation
cmp-fuzzy-path copied to clipboard

Lag issues

Open oblitzitate opened this issue 2 years ago • 1 comments

The cursor lags when typing a path in commandline mode.

I assume the code is blocking rather than async when loading the path.

oblitzitate avatar Jul 06 '22 22:07 oblitzitate

The code is not blocking. Moreover, you can set a lower timeout value for fd_timeout_msec, which will abort too long callbacks. Try this:

cmp.setup.cmdline(':', {                                                                                                                                                      
  sources = cmp.config.sources({                                                                                                                                              
    { name = 'fuzzy_path', options = {fd_timeout_msec = 50} }                                                                                                               
  })                                                                                                                                                                          
})          

You can also check CmpFuzzyStats to see how many times the timeout was exceeded.

tzachar avatar Jul 07 '22 05:07 tzachar