cmp issues fixed
This commit is contained in:
@ -7,7 +7,7 @@ local default_opts = { noremap = true, silent = true }
|
||||
-- Fast saving with <leader> and s
|
||||
map('n', '<leader>s', ':w<CR>', default_opts)
|
||||
map('n', '<leader>a', ':w|:luafile %<CR>', default_opts)
|
||||
map('n', '<leader>aa', ':w|:luafile %<CR> |:PackerCompile<CR>', default_opts)
|
||||
map('n', '<leader>aa', ':w|:luafile %<CR> |:PackerSync<CR>', default_opts)
|
||||
map('i', '<leader>s', '<C-c>:w<CR>', default_opts)
|
||||
|
||||
-- Move around splits using Ctrl + {h,j,k,l}
|
||||
|
||||
@ -37,10 +37,13 @@ cmp.setup {
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
["<C-e>"] = cmp.mapping({
|
||||
i = cmp.mapping.abort(),
|
||||
c = cmp.mapping.close(),
|
||||
}),
|
||||
["<C-y>"] = cmp.config.disable,
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
select = false,
|
||||
},
|
||||
|
||||
-- Tab mapping
|
||||
@ -68,15 +71,12 @@ cmp.setup {
|
||||
sources = {
|
||||
{ name = 'nvim-lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'cmdline'},
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'zsh' },
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
-- see https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#how-to-add-visual-studio-code-dark-theme-colors-to-the-menu
|
||||
vim.cmd[[
|
||||
highlight! link CmpItemMenu Comment
|
||||
|
||||
Reference in New Issue
Block a user