-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content from other tmux-clients is missing #1
Comments
Unfortunately, The deoplete integration ( |
In most cases I have a single tmux session, that's why this source doesn't grab contents from other sessions. I'll try add other sessions when I have some free time. Though, this is kind of low priority. |
It's kind of interesting to add |
That's just one way to implement it, you don't have to do the same.
Sorry, I'm not quite following... Will this allow writing async sources? If not, is there a way to do it now? That's treading on a thin ice, though. deoplete had (and still has, as far as I understand) multiple buts related to async sources and multiprocessing though... |
The tmux-complete.vim uses vimscript to launch tmux sub-process, and wait for the completion results. Blocking wait in vimscript means blocking wait of the editor. It's impossible to be async without change the main code of tmux-complete.vim. Which will require more time to debug and test.
I mean another feature. There's gif in the PR. To explain with more detail:
I think this feature should be useful, since the next popup is more context-aware. |
When you say "uses vimscript" you mean only the following single line, right (https://github.com/wellle/tmux-complete.vim/blob/master/rplugin/python3/deoplete/sources/tmuxcomplete.py#L16)? command = self.vim.call('tmuxcomplete#getcommand', '', 'words') So because we have this call to words = check_output(['sh', '-c', command]).decode('utf-8').splitlines() But it's not resorting to And even before that transition, there was Either of this can be applied in tmux-complete given proper support from completion framework side. Thus I'm asking what's the source model in ncm2? Can it do any of the following?
|
You're right. I misunderstood the source code. I thought it was running command in vimscript.
Unlike the old ncm, ncm2 no longer manage processes anymore. There's no strict source model in ncm2. All it does is to notify the sources ( Currently most sources is based on nvim-yarp. In this way, each source is a standalone process. Techniquely it is possible to write a nvim-yarp wrapper to easily group sources into a process using multi-threading, which is already proven in the old ncm. But there's no need for that at current state, since the only benifit is to save memory, and generally speeking it's not a good thing to suffer from GIL. |
Thanks, now it's clear to me.
I think this detail is very important to source authors and it affects heavily how a source is implemented. It basically means that |
@roxma Hi! It looks like currently the plugin lists only panes in the current session (client). I usually have multiple sessions with multiple windows (and usually one pane per window), so I'm missing out on a lot of tmux content from other sessions. tmux-complete (for deoplete) works fine, though: https://github.com/wellle/tmux-complete.vim/blob/master/sh/tmuxcomplete#L57
I noticed that it has integrations with many plugins. Maybe it's better to contribute ncm2 support to tmux complete?
deoplete Source there looks dead simple: https://github.com/wellle/tmux-complete.vim/blob/master/rplugin/python3/deoplete/sources/tmuxcomplete.py
The text was updated successfully, but these errors were encountered: