22 lines
605 B
Lua
22 lines
605 B
Lua
vim.pack.add({
|
|
gh("hrsh7th/nvim-cmp"),
|
|
gh("hrsh7th/cmp-nvim-lsp"),
|
|
gh("hrsh7th/cmp-buffer"),
|
|
gh("hrsh7th/cmp-path"),
|
|
})
|
|
|
|
local cmp = require("cmp")
|
|
cmp.setup({
|
|
mapping = cmp.mapping.preset.insert({
|
|
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
["<C-Space>"] = cmp.mapping.complete(),
|
|
["<C-e>"] = cmp.mapping.close(),
|
|
['<CR>'] = cmp.mapping.confirm({ select = false }),
|
|
}),
|
|
sources = cmp.config.sources({
|
|
{ name = "nvim_lsp" },
|
|
{ name = "buffer" },
|
|
{ name = "path" },
|
|
}),
|
|
})
|