lifepillar / vim-mucomplete

Chained completion that works the way you want!
MIT License
911 stars 18 forks source link

(Question) How to set MUcompleteNotify in my vimrc ? #211

Closed goberhammer closed 12 months ago

goberhammer commented 12 months ago

Sorry for the probably stupid question but, for the life of me, I can't find how to set MUcompleteNotify 2 in my vimrc. This is my config section:

" muComplete
MUcompleteNotify 2
let g:mucomplete#enable_auto_at_startup = 0
imap <c-space> <plug>(MUcompleteFwd)
imap <c-s-space> <plug>(MUcompleteBwd)
let g:mucomplete#cycle_with_trigger = 1
let g:mucomplete#chains = {}
let g:mucomplete#chains.default = [ 'omni', 'incl', 'path', 'dict', 'uspl' ]

The command MUcompleteNotify 2 works once vim is started, but fails with this error if set it in the vimrc: E492: Not an editor command: MUcompleteNotify 2

lifepillar commented 12 months ago

That's because plugins are loaded after the vimrc is loaded. But this should work:

call mucomplete#msg#set_notifications(2)
goberhammer commented 12 months ago

Can confirm that this solves the problem. Thanks a lot for your response. Best.