summaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
authorbh <qn+git@excalibur.computer>2025-11-13 21:29:39 +0800
committerbh <qn+git@excalibur.computer>2025-11-13 21:29:39 +0800
commitf3d3e0d5dc32bb5c00a6106aee9027decd345e63 (patch)
treebea3052a6d2766685d47bed64f1d3335eb95c49a /lua/plugins
parent6ba386ec6d6cc68b39621db3dfd216a79659fcd7 (diff)
Added Vim Completion
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/init.lua38
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") },