Closed statquant closed 3 years ago
Thank you report!
How about following config ?
call asyncomplete#register_source(asyncomplete#sources#omni#get_source_options({
\ 'name': 'omni',
\ 'allowlist': ['*'],
\ 'blocklist': ['c', 'cpp', 'html'],
\ 'completor': function('asyncomplete#sources#omni#completor'),
\ 'config': {
\ 'show_source_kind': 1
\ }
\ 'triggers': { "r": ["("] },
\ }))
asyncomplete.vim allow to customize completion trigger by triggers
option.
Default triggers is g:asyncomplete_triggers['*']
.
Yes that's perfect thank you very much. g:asyncomplete_triggers
is not referenced in the help
from what I can see am I looking at the wrong thing ?
I am also trying to disable completion if the line starts by #
, it seems that I can achieve this by using g:asyncomplete_preprocessor would that be the advised way ?
Maybe, g:asyncomplete_triggers
is not documented yet.
I am also trying to disable completion if the line starts by
#
, it seems that I can achieve this by using g:asyncomplete_preprocessor would that be the advised way ?
Sorry, I'm not familiar with g:asyncomplete_preprocessor
.
OK many thanks for your help. Closing if ok with you
Hello, thank you very much for
asyncomplete-omni.vim
, it works out of the box for vim8 ! I am using "as you type" complete for R in conjunction with Nvim-R. The only feature I am trying to get is for the completion to be triggered after(
and,<space>
Say I open
test.r
If I start to type lib I get => so that's great
And what I would like it to be able to type
plot(
and get completion like if I had doneplot(<C-X><C-O>
=> right now I need to press<C-X><C-O>
OR I can define a map likeinoremap ( (<C-x><C-o>
Is it doable by way of configuration? Many thanks
PS: I have a small .vimrc (although I think my question might just be plain vim)