From 9b791d88c67b9ad0293e0b45783de7219e2bd133 Mon Sep 17 00:00:00 2001 From: Giuseppe Gadola Date: Tue, 31 Jan 2023 11:56:48 +0100 Subject: feat: toggle/multiple instances Ability to spawn multiple popups simultanuosly and close them. --- lua/pets/commands.lua | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lua/pets/commands.lua (limited to 'lua/pets/commands.lua') diff --git a/lua/pets/commands.lua b/lua/pets/commands.lua new file mode 100644 index 0000000..8124cbc --- /dev/null +++ b/lua/pets/commands.lua @@ -0,0 +1,9 @@ +local pets = require("pets") + +vim.api.nvim_create_user_command("Pets", function() + pets.show() +end, {}) -- use nargs = 1 to accept arguments + +vim.api.nvim_create_user_command("PetsCloseAll", function() + pets.closeAll() +end, {}) -- cgit v1.3-2-g11bf