Skip to content
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

Add default source that uses is_async #669

Closed
blueyed opened this issue Feb 23, 2018 · 7 comments
Closed

Add default source that uses is_async #669

blueyed opened this issue Feb 23, 2018 · 7 comments

Comments

@blueyed
Copy link
Contributor

blueyed commented Feb 23, 2018

It would be useful to have an example or default source that makes use of is_async.

As for the feature itself it seems like deoplete is polling the sources regardless (until is_async gets set to False), right?
Would it be possible for the source to call deoplete instead?

Related: I've seen deoplete being stuck in the completion_begin/completion_end loop / polling all the time while in insert mode. This might be related to deoplete-jedi having crashed while experimenting (and therefore never could set self.is_async = False), but am not sure.
This needs investigation.

Ref: wellle/tmux-complete.vim#80

@Shougo
Copy link
Owner

Shougo commented Feb 23, 2018

I don't want to add no needed is_async source.
The default sources are not sample codes!

I think is_async source is not so needed in current deoplete.

@Shougo Shougo closed this as completed Feb 23, 2018
@Shougo
Copy link
Owner

Shougo commented Feb 23, 2018

As for the feature itself it seems like deoplete is polling the sources regardless (until is_async gets set to False), right?

Yes.

Would it be possible for the source to call deoplete instead?

No.

Related: I've seen deoplete being stuck in the completion_begin/completion_end loop / polling all the time while in insert mode. This might be related to deoplete-jedi having crashed while experimenting (and therefore never could set self.is_async = False), but am not sure.

#645

@blueyed
Copy link
Contributor Author

blueyed commented Feb 23, 2018

Would it be possible for the source to call deoplete instead?

No.

Are you sure? Why not?
Shouldn't sending a specific RPC message do it?
It could either be just for notification (i.e. "poll me again"), or contain the results already.

@Shougo
Copy link
Owner

Shougo commented Feb 25, 2018

Really?
Why it is needed?
I don't know the feature in the other auto completion plugins.

@blueyed
Copy link
Contributor Author

blueyed commented Feb 25, 2018

I think the pattern of notifying instead of being polled is better, since it causes less overhead.
But I do not know the internals good enough yet, and therefore asked for why you think it is not possible.

@Shougo
Copy link
Owner

Shougo commented Feb 26, 2018

If deoplete uses neovim event loop, the implementation may be possible.
But current implementation is not.

And it is not compabile with older source implementation.
etc...

I think async source support is not important.

@Shougo
Copy link
Owner

Shougo commented Feb 26, 2018

neovim/pynvim#294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants