diff options
Diffstat (limited to '.config/nvim/lua/plugins/cmp.lua')
-rwxr-xr-x | .config/nvim/lua/plugins/cmp.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua new file mode 100755 index 0000000..8f9dae2 --- /dev/null +++ b/.config/nvim/lua/plugins/cmp.lua @@ -0,0 +1,26 @@ +local cmp = require('cmp') + +cmp.setup({ + mapping = { + ['<C-j>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c' }), + ['<C-k>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c' }), + ['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), + -- ['<C-l>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), + -- ['<CR>'] = cmp.mapping.confirm({ select = true }) + }, + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + -- { name = 'cmdline' }, + { name = 'path' }, + { name = 'calc' } + }, + { + { name = 'buffer' } + }) +}) + +cmp.setup.cmdline('/', { + sources = { + { name = 'buffer' } + } +}) |