Add completion
This commit is contained in:
27
.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
27
.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.snippet.expand(args.body)
|
||||
end
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered()
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
},
|
||||
{{ name = "buffer"}})
|
||||
})
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user