Added copilot cmp plugin
This commit is contained in:
20
config/nvim/lua/user/plugins/cmp.lua
Normal file
20
config/nvim/lua/user/plugins/cmp.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
-- override the options table that is used in the `require("cmp").setup()` call
|
||||
opts = function(_, opts)
|
||||
-- opts parameter is the default options table
|
||||
-- the function is lazy loaded so cmp is able to be required
|
||||
local cmp = require "cmp"
|
||||
-- modify the sources part of the options table
|
||||
opts.sources = cmp.config.sources {
|
||||
{ name = "nvim_lsp", priority = 1000 },
|
||||
{ name = "luasnip", priority = 750 },
|
||||
{ name = "buffer", priority = 500 },
|
||||
{ name = "path", priority = 250 },
|
||||
{ name = "copilot", priority = 100 },
|
||||
}
|
||||
|
||||
-- return the new table to be used
|
||||
return opts
|
||||
end,
|
||||
} -- override nvim-cmp plugin
|
||||
Reference in New Issue
Block a user