dotfiles/nvim/.config/nvim/plugin/deoplete.vim
Marty Oehme e7ff8c9f78 Fix pandoc citation autocompletions
wiki.vim overwrites omnifunc for any buffer it sees as its own. Pandoc
uses g:pandoc#competion#Complete as its omnifunc to generate citations.

So we use deoplete to collect the citations and display them on being
invoked by `@`. When typing more, it filters the list accordingly.

Have not gotten preview window working again, nor searching of fields
other than bibkey.
2020-02-04 00:44:12 +01:00

22 lines
606 B
VimL

" PLUGIN: DEOPLETE
" For async completion
" enable deoplete at startup
let g:deoplete#enable_at_startup =1
let g:deoplete#enable_ignore_case =1
let g:deoplete#enable_smart_case =1
let g:deoplete#enable_camel_case =1
let g:deoplete#enable_refresh_always =1
let g:deoplete#max_abbr_width =0
let g:deoplete#max_menu_width =0
call deoplete#custom#var('omni', 'input_patterns', {
\'pandoc': '@\w*',
\})
call deoplete#custom#var('omni', 'functions', {
\'pandoc': 'pandoc#completion#Complete',
\})
call deoplete#custom#option({
\ 'auto_complete_delay': 0,
\ 'smart_case': v:true,
\})