diff options
| author | Tommaso Negri <tommaso@hey.com> | 2025-12-05 17:50:04 +0100 |
|---|---|---|
| committer | Tommaso Negri <tommaso@hey.com> | 2025-12-05 17:50:04 +0100 |
| commit | f9e2bdfd8285107572a356646b0a70d5a03136e7 (patch) | |
| tree | acbc8408fbf3cb35940cce8bea59b32cd6dcc435 /tests/lua.lua | |
| parent | 804891fd726137e024292149bbf67083fd0a422d (diff) | |
| download | voltage-f9e2bdfd8285107572a356646b0a70d5a03136e7.tar.gz voltage-f9e2bdfd8285107572a356646b0a70d5a03136e7.zip | |
Add test files
Diffstat (limited to 'tests/lua.lua')
| -rw-r--r-- | tests/lua.lua | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/lua.lua b/tests/lua.lua new file mode 100644 index 0000000..1c4ab1e --- /dev/null +++ b/tests/lua.lua @@ -0,0 +1,43 @@ +vim.pack.add({ + { src = "https://github.com/nvim-lua/plenary.nvim", name = "plenary" }, -- Common plugin dependency + { src = "https://github.com/mason-org/mason.nvim", name = "mason" }, + { src = "https://github.com/catppuccin/nvim", name = "catppuccin" }, + { src = "https://github.com/nvim-treesitter/nvim-treesitter", name = "treesitter" }, + { src = "https://github.com/ibhagwan/fzf-lua", name = "fzf" }, + { src = "https://github.com/saghen/blink.cmp", name = "blink", version = "v1.6.0" }, + { src = "https://github.com/echasnovski/mini.nvim", name = "mini", version = "stable" }, + { src = "https://github.com/mcncl/alabaster.nvim", name = "alabaster" }, +}) + +require("plugins.alabaster") +require("plugins.mycolortheme") +require("plugins.mason") +require("plugins.treesitter") +require("plugins.fzf") +require("plugins.blink") +require("plugins.mini") + +-- Add +vim.api.nvim_create_user_command("PackAdd", function(args) + vim.pack.add(args.fargs) +end, { nargs = "+" }) + +-- Delete +vim.api.nvim_create_user_command("PackDel", function(args) + vim.pack.del(args.fargs) +end, { nargs = "+" }) + +-- Get +vim.api.nvim_create_user_command("PackGet", function() + local plugins = vim.pack.get() + vim.print(plugins) +end, {}) + +-- Update +vim.api.nvim_create_user_command("PackUpdate", function(args) + if #args.fargs == 0 then + vim.pack.update() + else + vim.pack.update(unpack(args.fargs)) + end +end, { nargs = "*" }) |
