kitagry / asyncomplete-tabnine.vim

Experimental plugin for asyncomplete.vim and tabnine
13 stars 4 forks source link

`TabNine::config` doesn't work #9

Open kitagry opened 3 years ago

kitagry commented 3 years ago

This plugin doesn't work when TabNine::config is typed. This is because asyncomplete.vim call complete command only when specified characters such as . and : so on are typed.

https://www.tabnine.com/semantic

For example, deoplete-tabnine specified as following.

input_pattern = r'[^\w\s]$|TabNine::\w*$'

But, I don't understand how to specify input_pattern in asyncomplete.vim. And, I'm busy now. So, I can't solve this issue until October.

I welcome PR.

kitagry commented 3 years ago

asyncomplete.vim has an option triggers. And, TabNine::config works as following.

function! asyncomplete#sources#tabnine#get_source_options(opts)
    call s:start_tabnine()
    let a:opts['triggers'] = {'*': [':', '>', '.', 'g']}
    return a:opts
endfunction

This solution has two problems.

asyncomplete.vim should be changed to solve this PR.