From c45237c7394152dc63200f7eb71e816b30600d82 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 15 Apr 2021 13:21:15 +0530 Subject: use completion.nvim instead of compe --- init.vim | 36 +++++++----------------------------- plugin/maps.vim | 5 ++--- 2 files changed, 9 insertions(+), 32 deletions(-) diff --git a/init.vim b/init.vim index 3781471..01f3b1f 100644 --- a/init.vim +++ b/init.vim @@ -26,8 +26,8 @@ Plug 'git@ferrn:vim/vim-colors-plain' Plug 'git@ferrn:vim/better-text-objs' " nvim only -Plug 'hrsh7th/nvim-compe' Plug 'neovim/nvim-lspconfig' +Plug 'nvim-lua/completion-nvim' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} call plug#end() @@ -66,6 +66,12 @@ augroup fzfstatus endif augroup END +augroup completions + " Use completion-nvim in every buffer + autocmd! + autocmd BufEnter * lua require'completion'.on_attach() +augroup END + " general settings set nobackup set nowritebackup @@ -182,37 +188,9 @@ let g:tex_flavor = 'latex' let g:elm_setup_keybindings = 0 -let g:completion_enable_auto_hover = 0 let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy', 'all'] let g:completion_trigger_on_delete = 1 -let g:compe = {} -let g:compe.enabled = v:true -let g:compe.autocomplete = v:true -let g:compe.debug = v:false -let g:compe.min_length = 1 -let g:compe.preselect = 'enable' -let g:compe.throttle_time = 80 -let g:compe.source_timeout = 200 -let g:compe.incomplete_delay = 400 -let g:compe.max_abbr_width = 100 -let g:compe.max_kind_width = 100 -let g:compe.max_menu_width = 100 -let g:compe.documentation = v:true - -let g:compe.source = {} -let g:compe.source.path = v:true -let g:compe.source.buffer = v:true -let g:compe.source.calc = v:true -let g:compe.source.vsnip = v:false -let g:compe.source.nvim_lsp = v:true -let g:compe.source.nvim_lua = v:false -let g:compe.source.spell = v:true -let g:compe.source.tags = v:true -let g:compe.source.snippets_nvim = v:false -let g:compe.source.treesitter = v:true -let g:compe.source.omni = v:true - sign define LspDiagnosticsSignError text=× texthl=LspDiagnosticsSignError linehl= numhl= sign define LspDiagnosticsSignWarning text=\! texthl=LspDiagnosticsSignWarning linehl= numhl= sign define LspDiagnosticsSignInformation text=i texthl=LspDiagnosticsSignInformation linehl= numhl= diff --git a/plugin/maps.vim b/plugin/maps.vim index f3c5f76..e471542 100644 --- a/plugin/maps.vim +++ b/plugin/maps.vim @@ -39,6 +39,5 @@ xnoremap + g xnoremap - g " completions -inoremap compe#complete() -inoremap compe#confirm('') -inoremap compe#close('') +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" -- cgit v1.2.3