hrsh7th / cmp-path

nvim-cmp source for path
MIT License
627 stars 60 forks source link

feat: add max_traversed_entries option #67

Open gregorias opened 1 year ago

gregorias commented 1 year ago

At my work, we have a huge monorepo with a directory with over 70k entries. This plugin, being synchronous, was blocking Neovim for tens of seconds.

This option should be universally useful to just time-box any search done by this plugin. I don't think it makes sense to leave this search unbounded as people expect interactivity from Neovim.

Perhaps, some change of API will make it possible to make search more optimal (e.g., a batch fetch), but even than a limit to how many entries Neovim has to process is relevant.