summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-04-15 08:51:15 +0100
committerAkshay <[email protected]>2021-04-15 08:51:15 +0100
commitc45237c7394152dc63200f7eb71e816b30600d82 (patch)
treed3fe444200c77e7ff3c416a10c55ccdc2e39aa59
parentcd2f2561bd7bc0f41f2a42450fb9c207976c0177 (diff)
use completion.nvim instead of compe
-rw-r--r--init.vim36
-rw-r--r--plugin/maps.vim5
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'
26Plug 'git@ferrn:vim/better-text-objs' 26Plug 'git@ferrn:vim/better-text-objs'
27 27
28" nvim only 28" nvim only
29Plug 'hrsh7th/nvim-compe'
30Plug 'neovim/nvim-lspconfig' 29Plug 'neovim/nvim-lspconfig'
30Plug 'nvim-lua/completion-nvim'
31Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} 31Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
32 32
33call plug#end() 33call plug#end()
@@ -66,6 +66,12 @@ augroup fzfstatus
66 endif 66 endif
67augroup END 67augroup END
68 68
69augroup completions
70 " Use completion-nvim in every buffer
71 autocmd!
72 autocmd BufEnter * lua require'completion'.on_attach()
73augroup END
74
69" general settings 75" general settings
70set nobackup 76set nobackup
71set nowritebackup 77set nowritebackup
@@ -182,37 +188,9 @@ let g:tex_flavor = 'latex'
182 188
183let g:elm_setup_keybindings = 0 189let g:elm_setup_keybindings = 0
184 190
185let g:completion_enable_auto_hover = 0
186let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy', 'all'] 191let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy', 'all']
187let g:completion_trigger_on_delete = 1 192let g:completion_trigger_on_delete = 1
188 193
189let g:compe = {}
190let g:compe.enabled = v:true
191let g:compe.autocomplete = v:true
192let g:compe.debug = v:false
193let g:compe.min_length = 1
194let g:compe.preselect = 'enable'
195let g:compe.throttle_time = 80
196let g:compe.source_timeout = 200
197let g:compe.incomplete_delay = 400
198let g:compe.max_abbr_width = 100
199let g:compe.max_kind_width = 100
200let g:compe.max_menu_width = 100
201let g:compe.documentation = v:true
202
203let g:compe.source = {}
204let g:compe.source.path = v:true
205let g:compe.source.buffer = v:true
206let g:compe.source.calc = v:true
207let g:compe.source.vsnip = v:false
208let g:compe.source.nvim_lsp = v:true
209let g:compe.source.nvim_lua = v:false
210let g:compe.source.spell = v:true
211let g:compe.source.tags = v:true
212let g:compe.source.snippets_nvim = v:false
213let g:compe.source.treesitter = v:true
214let g:compe.source.omni = v:true
215
216sign define LspDiagnosticsSignError text=× texthl=LspDiagnosticsSignError linehl= numhl= 194sign define LspDiagnosticsSignError text=× texthl=LspDiagnosticsSignError linehl= numhl=
217sign define LspDiagnosticsSignWarning text=\! texthl=LspDiagnosticsSignWarning linehl= numhl= 195sign define LspDiagnosticsSignWarning text=\! texthl=LspDiagnosticsSignWarning linehl= numhl=
218sign define LspDiagnosticsSignInformation text=i texthl=LspDiagnosticsSignInformation linehl= numhl= 196sign 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<C-a>
39xnoremap - g<C-x> 39xnoremap - g<C-x>
40 40
41" completions 41" completions
42inoremap <silent><expr> <C-Space> compe#complete() 42inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
43inoremap <silent><expr> <CR> compe#confirm('<CR>') 43inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
44inoremap <silent><expr> <C-e> compe#close('<C-e>')