1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Make nvim-compe setting all lua

For lua plugins, configuring them in lua instead of vim script is sensible.
This commit is contained in:
jdhao 2021-04-11 23:49:17 +08:00
parent aeea5f18f5
commit 1a16156bd6

View File

@ -447,14 +447,14 @@ require'compe'.setup {
}
vim.o.completeopt = "menuone,noselect"
EOF
" nvim-comple mappings
inoremap <silent><expr> <C-Space> compe#complete()
inoremap <silent><expr> <CR> compe#confirm('<CR>')
inoremap <silent><expr> <C-e> compe#close('<C-e>')
inoremap <silent><expr> <C-f> compe#scroll({ 'delta': +4 })
inoremap <silent><expr> <C-d> compe#scroll({ 'delta': -4 })
-- nvim-comple mappings
vim.api.nvim_set_keymap('i', '<C-Space>', 'compe#complete()', {expr = true})
vim.api.nvim_set_keymap('i', '<CR>', "compe#confirm('<CR>')", {expr = true})
vim.api.nvim_set_keymap('i', '<C-e>', "compe#close('<C-e>')", {expr = true})
vim.api.nvim_set_keymap('i', '<C-f>', "compe#scroll({'delta': +4})", {expr = true})
vim.api.nvim_set_keymap('i', '<C-d>', "compe#scroll({'delta': -4})", {expr = true})
EOF
"""""""""""""""""""""""""UltiSnips settings"""""""""""""""""""
" Trigger configuration. Do not use <tab> if you use YouCompleteMe