Improved neovim config
This commit is contained in:
24
.config/nvim/lua/plugins/cmp.lua
Normal file
24
.config/nvim/lua/plugins/cmp.lua
Normal file
@ -0,0 +1,24 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
mapping = {
|
||||
["<C-space>"] = cmp.mapping.complete(),
|
||||
["<cr>"] = cmp.mapping.confirm({ select = true }),
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
Reference in New Issue
Block a user