chore(nvim): use nvim-cmp

main
sudo pacman -Syu 2023-07-01 00:43:55 +07:00
parent 838e1befd8
commit 110834ab4b
1 changed files with 28 additions and 0 deletions

View File

@ -164,6 +164,34 @@ require("lazy").setup({
end, end,
}, },
-- https://github.com/hrsh7th/nvim-cmp
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
"neovim/nvim-lspconfig",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
},
config = function()
local cmp = require("cmp")
cmp.setup({
mapping = cmp.mapping.preset.insert({
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}),
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
}, {
{ name = "buffer" },
}),
})
end,
},
-- https://github.com/lukas-reineke/indent-blankline.nvim -- https://github.com/lukas-reineke/indent-blankline.nvim
{ {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",