summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/opts.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/opts.lua')
-rw-r--r--.config/nvim/lua/opts.lua13
1 files changed, 2 insertions, 11 deletions
diff --git a/.config/nvim/lua/opts.lua b/.config/nvim/lua/opts.lua
index a1c0bbf..aa56f76 100644
--- a/.config/nvim/lua/opts.lua
+++ b/.config/nvim/lua/opts.lua
@@ -16,11 +16,12 @@ cmp.setup {
end,
},
mapping = {
+ ['<CR>'] = cmp.mapping.confirm({ select = true }),
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
- ['<C-c>'] = cmp.mapping.close(),
+ ['<C-e>'] = cmp.mapping.close(),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
@@ -51,16 +52,6 @@ cmp.setup {
vim.cmd('autocmd FileType markdown lua require("cmp").setup.buffer { enabled = false }')
require('nvim-autopairs').setup{}
-require("nvim-autopairs.completion.cmp").setup {
- map_cr = true, -- map <CR> on insert mode
- map_complete = true, -- it will auto insert `(` (map_char) after select function or method item
- auto_select = true, -- automatically select the first item
- insert = false, -- use insert confirm behavior instead of replace
- map_char = { -- modifies the function or method delimiter by filetypes
- all = '(',
- tex = '{',
- },
-}
-- LSPCONFIG
local nvim_lsp = require('lspconfig')