diff options
| -rw-r--r-- | lua/plugins/init.lua | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 760660f..bec9119 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -35,23 +35,39 @@ return { end }, + { + "hrsh7th/nvim-cmp", + event = "InsertEnter", -- lazy load when entering insert mode + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "saadparwaiz1/cmp_luasnip", + "L3MON4D3/LuaSnip", + "rafamadriz/friendly-snippets", + "onsails/lspkind.nvim", + }, + config = function() + require("config.completion")() -- load the separate config file + end, + }, + -- Autocompletion { "hrsh7th/nvim-cmp" }, { "hrsh7th/cmp-nvim-lsp" }, -- Snippets - { - "L3MON4D3/LuaSnip", - -- follow latest release. - version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release) - -- install jsregexp (optional!). - dependencies = { "rafamadriz/friendly-snippets" }, - build = "make install_jsregexp", - config = function() - require("config.luasnip")() - end, - }, + { + "L3MON4D3/LuaSnip", + version = "v2.*", + dependencies = { "rafamadriz/friendly-snippets" }, + build = "make install_jsregexp", + config = function() + -- Call the returned function from your module + require("config.luasnip")() + end, + }, -- File Explorer { "nvim-tree/nvim-tree.lua", config = require("config.tree") }, |
