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