1
0
Fork 0

.config/nvim: disable autocompletion (for now)

main
urosm 2024-07-15 20:49:39 +02:00
parent 0fa2ff7ba4
commit 5320b2053b
1 changed files with 13 additions and 12 deletions

View File

@ -55,7 +55,7 @@ opt.clipboard = "unnamedplus"
-- editing text
opt.undofile = true
opt.textwidth = 80
opt.completeopt = { "menuone", "preview", "noselect" }
opt.completeopt = { "menuone", "preview" }
-- tabs and indenting
opt.tabstop = 4
@ -115,14 +115,15 @@ keymap_set("n", "<leader>.", "<cmd>edit .<cr>")
-- buffer autocomplete ---------------------------------------------------------
local bufautocomplete_augroup = api.nvim_create_augroup("Buffer autocompletion", {}),
api.nvim_create_autocmd("InsertCharPre", {
group = bufautocomplete_augroup,
pattern = "*",
callback = function ()
if fn.pumvisible() == 0 and v.char:find("%w") then
api.nvim_input("<c-n>")
end
end,
desc = "Buffer autocomplete on InsertCharPre",
})
-- @note disable autocompletion for now
-- local bufautocomplete_augroup = api.nvim_create_augroup("Buffer autocompletion", {}),
-- api.nvim_create_autocmd("InsertCharPre", {
-- group = bufautocomplete_augroup,
-- pattern = "*",
-- callback = function ()
-- if fn.pumvisible() == 0 and v.char:find("%w") then
-- api.nvim_input("<c-n>")
-- end
-- end,
-- desc = "Buffer autocomplete on InsertCharPre",
-- })