I use lsp-zero.nvim
and it requires nvim-cmp
which is what I think is causing the problem.
How can I retain the native autocompletion i_CTRL-P
and i_CTRL-N
while also using cmp
?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityThe zero-lsp.nvim comes with some default key bindings that overrides the standard Ctrl n, Ctrl p.
You can disable these key bindings following the instruction: disable keybindings
The default setup instruction propose to add the following code into init.lua
:
local lsp = require('lsp-zero').preset({})
lsp.on_attach(function(client, bufnr)
-- see :help lsp-zero-keybindings
-- to learn the available actions
lsp.default_keymaps({buffer = bufnr})
end)
lsp.setup()
If you don't want to override the key bindings insert instead:
local lsp = require('lsp-zero').preset({})
lsp.setup()