aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorGiuseppe Gadola <giusgadola@gmail.com>2023-02-12 10:50:48 +0100
committerGiuseppe Gadola <giusgadola@gmail.com>2023-02-12 10:50:48 +0100
commit3c505b86c0d5094592778ceba1c0a960abef0231 (patch)
tree3057b016025fbc8ac2c671b9bd37fe841b623e01 /lua
parentdocs: added some function explanations and comments (diff)
refactor(commands): PetsNew spawns a pet with the default style and type
Diffstat (limited to 'lua')
-rw-r--r--lua/pets.lua2
-rw-r--r--lua/pets/commands.lua2
2 files changed, 3 insertions, 1 deletions
diff --git a/lua/pets.lua b/lua/pets.lua
index c0ebf24..3fd5a98 100644
--- a/lua/pets.lua
+++ b/lua/pets.lua
@@ -4,6 +4,8 @@ M.options = {
row = 5, -- the row (height) to display the pet at
col = 0, -- the column to display the pet at (set to high numeber to have it stay stil at the right)
speed_multiplier = 1,
+ default_pet = "cat",
+ default_style = "brown",
}
M.pets = {}
diff --git a/lua/pets/commands.lua b/lua/pets/commands.lua
index 7bf9d8c..20e3c05 100644
--- a/lua/pets/commands.lua
+++ b/lua/pets/commands.lua
@@ -1,7 +1,7 @@
local pets = require("pets")
vim.api.nvim_create_user_command("PetsNew", function(input)
- pets.create_pet(input.args, "cat", "light_grey")
+ pets.create_pet(input.args, pets.options.default_pet, pets.options.default_style)
end, { nargs = 1 })
vim.api.nvim_create_user_command("PetsKillAll", function()