-
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
[#140] add simple completion function #144
base: master
Are you sure you want to change the base?
Conversation
You can create I've checked the operation via the following code: function s:ts_comp(opt, ctx)
call tsuquyomi#getCompletions({candidates, startcol ->
\ asyncomplete#complete('typesctipt', a:ctx, startcol, candidates)
\ })
endfunction
call asyncomplete#register_source({
\ 'name': 'tsuquyomi',
\ 'whitelist': ['typescript'],
\ 'priority': 5,
\ 'completor': function('s:ts_comp'),
\ }) How about it ? |
@@ -393,6 +397,19 @@ function! tsuquyomi#complete(findstart, base) | |||
|
|||
endif | |||
endfunction | |||
|
|||
function tsuquyomi#getCompletions(callback) | |||
if tsuquyomi#statusServer() == 'dead' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the server has not started is it still considered dead
?
looks good but some comments here.
|
Seems like even saving a file for a big project has this issue. So I don't think anything can be done now to fix the initial unresponsiveness unless it is moved to full async implmentation. PR looks good. |
provide
tsuquyomi#getCompletion
function for #140.