nvim: Switch to completion-nvim and drop deoplete

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2020-05-23 12:36:08 +05:30
parent c5bf8764f6
commit cdc8feecc8
5 changed files with 12 additions and 41 deletions

View file

@ -9,7 +9,7 @@ let g:jedi#rename_command = "gr"
let g:jedi#auto_initialization = 1
let g:jedi#auto_vim_configuration = 0
let g:jedi#use_tabs_not_buffers = 1
let g:jedi#use_tabs_not_buffers = 0
let g:jedi#popup_on_dot = 1
let g:jedi#popup_select_first = 0
let g:jedi#smart_auto_mappings = 0
@ -17,6 +17,4 @@ let g:jedi#show_call_signatures = "2"
let g:jedi#show_call_signatures_delay = 0
let g:jedi#show_call_signatures_modes = 'i'
let g:jedi#enable_speed_debugging = 0
let g:jedi#completions_enabled = 0
let g:jedi#completions_enabled = 1

View file

@ -1,8 +1,8 @@
nmap <buffer> gd <Plug>DeopleteRustGoToDefinitionDefault
nmap <buffer> K <Plug>DeopleteRustShowDocumentation
nmap <buffer> gv <Plug>DeopleteRustGoToDefinitionVSplit
nmap <buffer> gh <Plug>DeopleteRustGoToDefinitionSplit
nmap <buffer> gt <Plug>DeopleteRustGoToDefinitionTab
nmap <buffer> gd <Plug>(rust-def)
nmap <buffer> K <Plug>(rust-doc)
nmap <buffer> gv <Plug>(rust-def-vertical)
nmap <buffer> gh <Plug>(rust-def-split)
nmap <buffer> gt <Plug>(rust-def-tab)
augroup rust_maps
au!
@ -16,4 +16,3 @@ augroup rust_maps
au FileType rust au BufEnter let s:quitting = 0
au FileType rust au BufWritePost if ! s:quitting | Neomake | else | echom "Neomake disabled" | endif
augroup END

View file

@ -27,3 +27,6 @@ augroup QfAlwaysBottom
autocmd!
autocmd FileType qf wincmd J
augroup END
" Use completion-nvim in every buffer
autocmd BufEnter * lua require'completion'.on_attach()

View file

@ -12,9 +12,7 @@ Plug 'axelf4/vim-strip-trailing-whitespace'
" Manage Project sessions
Plug 'thaerkh/vim-workspace'
" For autocompletion
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'Shougo/neco-syntax'
Plug 'deoplete-plugins/deoplete-tag'
Plug 'haorenW1025/completion-nvim'
" For tmux
Plug 'tmux-plugins/vim-tmux-focus-events'
Plug 'wellle/tmux-complete.vim'
@ -76,7 +74,7 @@ Plug 'godlygeek/tabular', { 'for': 'haskell' }
Plug 'ndmitchell/ghcid', { 'rtp': 'plugins/nvim' }
" Rust
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
Plug 'sebastianmarkow/deoplete-rust', { 'for': 'rust' }
Plug 'racer-rust/vim-racer', { 'for': 'rust' }
" Purescript
Plug 'purescript-contrib/purescript-vim'
Plug 'frigoeu/psc-ide-vim'
@ -92,7 +90,6 @@ Plug 'vim-erlang/vim-erlang-omnicomplete', { 'for': 'erlang' }
Plug 'vim-erlang/vim-erlang-compiler', { 'for': 'erlang' }
" Python
Plug 'vim-python/python-syntax'
Plug 'deoplete-plugins/deoplete-jedi'
Plug 'davidhalter/jedi-vim', { 'for': 'python' }
" C/C++
Plug 'vim-jp/vim-cpp'

View file

@ -71,29 +71,3 @@ let g:cpp_concepts_highlight = 1
let g:markify_error_text = 'E'
let g:markify_warning_text = 'W'
let g:markify_info_text = 'I'
" Deoplete
let g:deoplete#enable_at_startup = 0
let g:deoplete#sources#rust#disable_keymap = 1
let g:deoplete#sources#rust#racer_binary=expand('$HOME/.cargo/bin/racer')
let g:deoplete#sources#rust#rust_source_path=expand('$HOME/GitSources/rust/src')
let g:deoplete#sources = {}
call deoplete#custom#source('_', 'disabled_syntaxes', ['Comment', 'String'])
call deoplete#custom#option('sources', {
\ '_' : ['buffer', 'omni', 'around', 'file', 'member'],
\ 'haskell': ['tag', 'buffer', 'omni'],
\ 'c': ['tag', 'buffer'],
\ 'purescript': ['buffer', 'omni'],
\ 'rust': ['racer', 'buffer'],
\})
call deoplete#custom#source('omni', 'functions', {
\ 'purescript': 'PSCIDEComplete',
\})
call deoplete#custom#var('omni', 'input_patterns', {
\ 'purescript': '\w*',
\})
call deoplete#custom#option({
\ 'auto_complete_delay': 200,
\ 'auto_complete': v:true,
\ 'smart_case': v:true,
\ })