-
Notifications
You must be signed in to change notification settings - Fork 72
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 api to get async completion item results #140
Comments
Hi @prabirshrestha . First, I can add an method function! tsuquyuomi#get_completions(callback)
" delegate tsuquyomi#complete and creates matches list
call a:callback(matches)
endfunction However, Second, I don't imagine what |
It is possible to only have
@Quramy if you provide a branch for me to play around that has this api |
@Quramy any updates on this? Thinking again only function! asyncomplete#sources#tsuquyomi#completor(opt, ctx) abort
if tsuquyomi#is_running()
call tsuquyomi#get_completions_async(function('s:on_completion', [a:opt, a:ctx])})
endif
endfunction
function! s:on_completion(opt, ctx, error, candidates, startcol)
call asyncomplete#complete(a:opt['name'], a:ctx, a:startcol, a:candidates)
endfunction |
@prabirshrestha, sorry for my late reply 🙇 |
BTW, |
@prabirshrestha anything need to be done to get Tsuquyomi completion in asyncomplete.vim? Or is it not supported yet? |
@electric-ladyland Tsuquyomi would require a huge refactor to make it async. I use language server protocol in vim so I can get async completion as well as other features such as goto definition, rename, find references and autocomplete. Here are the relevant docs on how to configure it. |
@prabirshrestha Thanks for links, I just tried LSP and it seems to work well, especially async autocomplete for TS. My dilemma is auto-import capability, which Tsuquyomi supports. Any thoughts on this (do you use Tsuquyomi and LSP at the same time)? BTW thanks for a great set of plugins (also thanks to you @Quramy). |
@electric-ladyland vim-lsp and asyncomplete.vim doesn't support for auto-import capabilities. LSP does specify I have gone async for all my vim plugins and so I no longer use Tsuquyomi. I'm willing to sacrifice auto import and other great capabilities that Tsuquyomi provider over async. I strongly believe in LSP as the future. |
I would like to create asyncomplete.vim source using tsuquyomi. I have currently implemented it for tscompletejob at https://github.com/prabirshrestha/asyncomplete-tscompletejob.vim.
Would it be possible to implement a methods so that I can create these sources:
The text was updated successfully, but these errors were encountered: