Public Access
adhoc better completions
This commit is contained in:
@@ -29,7 +29,7 @@ o.expandtab = true -- Inserts spaces w
|
|||||||
o.smartindent = true -- Adds indentation automatically on new lines.
|
o.smartindent = true -- Adds indentation automatically on new lines.
|
||||||
o.swapfile = false -- Disables swapfile creation.
|
o.swapfile = false -- Disables swapfile creation.
|
||||||
o.incsearch = true -- Updates search matches as you type.
|
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.pumheight = 8 -- Limits the completion popup menu size.
|
||||||
o.updatetime = 50 -- Reduces idle delay for swap and CursorHold events.
|
o.updatetime = 50 -- Reduces idle delay for swap and CursorHold events.
|
||||||
o.spelllang = { "en_us" } -- Uses US English for spell checking.
|
o.spelllang = { "en_us" } -- Uses US English for spell checking.
|
||||||
|
|||||||
@@ -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({})
|
icons.setup({})
|
||||||
|
|
||||||
git.setup({})
|
git.setup({})
|
||||||
@@ -87,6 +73,15 @@ pairs.setup({
|
|||||||
modes = { insert = true, command = true, terminal = false },
|
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({})
|
ai.setup({})
|
||||||
|
|
||||||
notify.setup({
|
notify.setup({
|
||||||
|
|||||||
Reference in New Issue
Block a user