nvim: Add buffers as a completion source for completion-nvim

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2020-08-27 19:34:32 +05:30
parent 2c4f5ff052
commit 83a6c276aa
2 changed files with 6 additions and 0 deletions

View file

@ -14,6 +14,7 @@ Plug 'axelf4/vim-strip-trailing-whitespace'
Plug 'thaerkh/vim-workspace'
" For autocompletion
Plug 'nvim-lua/completion-nvim'
Plug 'steelsojka/completion-buffers'
" For tmux
Plug 'tmux-plugins/vim-tmux-focus-events'
Plug 'wellle/tmux-complete.vim'

View file

@ -65,6 +65,7 @@ let g:completion_enable_auto_popup = 1
let g:completion_auto_change_source = 1
let g:completion_chain_complete_list = {
\ 'c': [
\ {'complete_items': ['buffers']},
\ {'mode': 'keyn'},
\ {'mode': 'tags'},
\ {'mode': '<c-p>'},
@ -72,21 +73,25 @@ let g:completion_chain_complete_list = {
\],
\ 'haskell': [
\ {'complete_items': ['lsp']},
\ {'complete_items': ['buffers']},
\ {'mode': 'keyn'},
\ {'mode': '<c-p>'},
\ {'mode': '<c-n>'},
\],
\ 'rust': [
\ {'complete_items': ['lsp']},
\ {'complete_items': ['buffers']},
\ {'mode': 'keyn'}
\],
\ 'purescript': [
\ {'complete_items': ['lsp']},
\ {'complete_items': ['buffers']},
\ {'mode': 'keyn'},
\ {'mode': '<c-p>'},
\ {'mode': '<c-n>'}
\],
\ 'default': [
\ {'complete_items': ['buffers']},
\ {'mode': 'keyn'},
\ {'mode': '<c-p>'},
\ {'mode': '<c-n>'},