diff --git a/home-manager/editor/neovim.nix b/home-manager/editor/neovim.nix index 93c1cb32..1784aaa6 100644 --- a/home-manager/editor/neovim.nix +++ b/home-manager/editor/neovim.nix @@ -128,7 +128,7 @@ in vim.keymap.set('n', '', ':noh') -- completion - vim.opt.completeopt = 'menu' + vim.opt.completeopt = 'menu,menuone,noinsert' vim.keymap.set({'i', 'c'}, '', function() return vim.fn.pumvisible() ~= 0 and '' or '' end, { expr = true }) @@ -512,7 +512,10 @@ in config = /* lua */ '' local cmp = require("cmp") cmp.setup({ - completion = { autocomplete = false }, + completion = { + autocomplete = false, + completeopt = 'menu,menuone,noinsert' + }, mapping = { [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), @@ -520,7 +523,7 @@ in [''] = cmp.mapping.select_next_item(), [''] = cmp.mapping.complete(), [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm(), + [''] = cmp.mapping.confirm({ select = true }), }, snippet = { expand = function(args)