diff options
Diffstat (limited to 'lua/pets/commands.lua')
| -rw-r--r-- | lua/pets/commands.lua | 56 |
1 files changed, 12 insertions, 44 deletions
diff --git a/lua/pets/commands.lua b/lua/pets/commands.lua index 33edb14..336a816 100644 --- a/lua/pets/commands.lua +++ b/lua/pets/commands.lua @@ -2,11 +2,7 @@ local pets = require("pets") local utils = require("pets.utils") vim.api.nvim_create_user_command("PetsNew", function(input) - vim.notify( - "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.", - vim.log.levels.INFO - ) - --[[ local pet, style = pets.options.default_pet, pets.options.default_style + local pet, style = pets.options.default_pet, pets.options.default_style -- validate the pets and style options if not utils.validate_type_style(pet, style) then @@ -14,15 +10,15 @@ vim.api.nvim_create_user_command("PetsNew", function(input) end if pets.options.random then - local styles = utils.available_pets["cat"] - pet, style = "cat", styles[math.random(#styles)] + local styles = utils.available_pets["dog"] + pet, style = "dog", styles[math.random(#styles)] end - pets.create_pet(input.args, pet, style) ]] + pets.create_pet(input.args, pet, style) end, { nargs = 1 }) vim.api.nvim_create_user_command("PetsNewCustom", function(input) - --[[ local args = vim.split(input.args, " ", { trimempty = true }) + local args = vim.split(input.args, " ", { trimempty = true }) if #args ~= 3 then utils.warning("Inccorect number of arguments!\nUSAGE: PetsNewCustom {type} {style} {name}") return @@ -31,60 +27,32 @@ vim.api.nvim_create_user_command("PetsNewCustom", function(input) if not utils.validate_type_style(type, style) then return end - pets.create_pet(name, type, style) ]] - vim.notify( - "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.", - vim.log.levels.INFO - ) + pets.create_pet(name, type, style) end, { nargs = 1, complete = utils.complete_typestyle }) vim.api.nvim_create_user_command("PetsKillAll", function() - -- pets.kill_all() - vim.notify( - "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.", - vim.log.levels.INFO - ) + pets.kill_all() end, {}) vim.api.nvim_create_user_command("PetsKill", function(input) - -- pets.kill_pet(input.args) - vim.notify( - "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.", - vim.log.levels.INFO - ) + pets.kill_pet(input.args) end, { nargs = 1, complete = utils.complete_name, }) vim.api.nvim_create_user_command("PetsList", function() - -- pets.list() - vim.notify( - "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.", - vim.log.levels.INFO - ) + pets.list() end, {}) vim.api.nvim_create_user_command("PetsPauseToggle", function() - -- pets.toggle_pause() - vim.notify( - "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.", - vim.log.levels.INFO - ) + pets.toggle_pause() end, {}) vim.api.nvim_create_user_command("PetsHideToggle", function() - -- pets.toggle_hide() - vim.notify( - "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.", - vim.log.levels.INFO - ) + pets.toggle_hide() end, {}) vim.api.nvim_create_user_command("PetsSleepToggle", function() - -- pets.toggle_sleep() - vim.notify( - "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.", - vim.log.levels.INFO - ) + pets.toggle_sleep() end, {}) |