Open gregorias opened 1 year ago
Hitting this too at the moment, made me think it was an issue with cmp-path: https://github.com/hrsh7th/cmp-path/issues/68
Temporarily working around this by disabling cmp-cmdline on e
and edit
:
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' },
{ name = 'cmdline', option = { ignore_cmds = { 'Man', '!', 'e', 'edit'}}}
})
})
It is possible to get around blocking calls that take a long time. I wrote a autocompletion plugin (https://github.com/girishji/autosuggest.vim) for cmdline-mode completion in vim9script. I solved this problem by adding a timeout to job_start()
. There are certain completions that are long running (like **
expansion). I check them first in a separate process. I assume similar mechanism can be used in neovim as well.
hitting this too.
I would be happy (enough) with the ability to exclude some paths from cmp-path completion as a work-around (happy to file a feature request under cmp-path if desired)
This plugin synchronously calls
vim.fn.getcompletion
. When that happens, the entire Neovim is blocked until that call completes. Unfortunately, that call can take a long time in some circumstances. For example, completing:e huge_nfs_directory/
takes a minute on my machine. I suspect that https://github.com/hrsh7th/cmp-cmdline/issues/84 is another example of this.There are a few avenues we could take to remedy this:
vim.fn.getcompletion
. I don't know what alternative there is though.