Closed cvlmtg closed 5 years ago
That's kind of a different feature.
You should fork this repo and create your own source
Just switched to ncm2 from ncm and would also love this feature. The following ncm plugin might also help:
https://github.com/fgrsnau/ncm-otherbuf/
I'd be happy to port this but I've never written any autocomplete plugin for ncm or ncm2 or anything else, so I'm not really sure where to start.
This repo is a relatively small example of writing ncm2 source.
You could use this repo as a start, and try some modifications before porting otherbuf.
::help ncm2#register_source
and :help ncm2#complete
has some information on how ncm2 works.
@roxma I did some looking into the source of each project and I think I could figure it out, but from what I can tell it looks like it might not be efficient without support for receiving autocmd events from ncm2. It looks like this was a feature in ncm, but not currently in ncm2. Are there plans to support this in ncm2?
it looks like it might not be efficient without support for receiving autocmd events from ncm2
ncm and ncm2 both have the same data flow for autocmd support, except that that ncm2 needs more code. They should have the same performance.
But ncm2's way is more customizable, you could send all required vimscript variables to the source module in one notification, without having to ask for it again in the remote process.
FWIW, I'm working on a pr for ncm2 https://github.com/ncm2/ncm2/pull/28, it will make completion for other buffers more powerful.
Could it be possible to enable the completion from other buffers as well as the current one? thanks!