adhoc better completions

This commit is contained in:
2026-09-18 01:50:34 +02:00
parent 5b7df5dfb4
commit 83561baf1f
2 changed files with 10 additions and 15 deletions
+1 -1
View File
@@ -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.
+9 -14
View File
@@ -39,20 +39,6 @@ clue.setup({
},
})
completion.setup({})
local function complete_accept_top()
if vim.fn.pumvisible() == 0 then
return "<C-y>"
end
if vim.fn.complete_info({ "selected" }).selected == -1 then
return "<C-n><C-y>"
end
return "<C-y>"
end
vim.keymap.set("i", "<C-y>", 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", "<CR>", function()
if vim.fn.complete_info({ "selected" }).selected ~= -1 then
return "\25"
end
return MiniPairs.cr()
end, { expr = true })
ai.setup({})
notify.setup({