diff --git a/nvim/.config/nvim/lua/romanzy/options.lua b/nvim/.config/nvim/lua/romanzy/options.lua index efc8622..b9c2327 100644 --- a/nvim/.config/nvim/lua/romanzy/options.lua +++ b/nvim/.config/nvim/lua/romanzy/options.lua @@ -29,7 +29,7 @@ o.expandtab = true -- Inserts spaces w o.smartindent = true -- Adds indentation automatically on new lines. o.swapfile = false -- Disables swapfile creation. o.incsearch = true -- Updates search matches as you type. -o.completeopt = { "menuone", "noselect", "fuzzy", "nosort" } -- Enables fuzzy completion matching. +o.completeopt = { "menuone", "noinsert", "fuzzy", "nosort" } -- Enables fuzzy completion matching. o.pumheight = 8 -- Limits the completion popup menu size. o.updatetime = 50 -- Reduces idle delay for swap and CursorHold events. o.spelllang = { "en_us" } -- Uses US English for spell checking. diff --git a/nvim/.config/nvim/lua/romanzy/plugins/mini.lua b/nvim/.config/nvim/lua/romanzy/plugins/mini.lua index 16d982f..181b29a 100644 --- a/nvim/.config/nvim/lua/romanzy/plugins/mini.lua +++ b/nvim/.config/nvim/lua/romanzy/plugins/mini.lua @@ -39,20 +39,6 @@ clue.setup({ }, }) -completion.setup({}) -local function complete_accept_top() - if vim.fn.pumvisible() == 0 then - return "" - end - - if vim.fn.complete_info({ "selected" }).selected == -1 then - return "" - end - - return "" -end -vim.keymap.set("i", "", complete_accept_top, { expr = true }) - icons.setup({}) git.setup({}) @@ -87,6 +73,15 @@ pairs.setup({ modes = { insert = true, command = true, terminal = false }, }) +completion.setup({}) +vim.keymap.set("i", "", function() + if vim.fn.complete_info({ "selected" }).selected ~= -1 then + return "\25" + end + + return MiniPairs.cr() +end, { expr = true }) + ai.setup({}) notify.setup({