.config/nvim: disable autocompletion (for now)
parent
0fa2ff7ba4
commit
5320b2053b
|
@ -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",
|
||||
-- })
|
||||
|
|
Loading…
Reference in New Issue