aboutsummaryrefslogtreecommitdiff
path: root/lua/pets/pet.lua
diff options
context:
space:
mode:
authorGiuseppe Gadola <giusgadola@gmail.com>2023-02-16 14:03:55 +0100
committerGiuseppe Gadola <giusgadola@gmail.com>2023-02-16 14:13:49 +0100
commitc8a5c2dfd256b780a30f37d69cfe9c407db4bf5e (patch)
tree75f0006d5d87473b4d10fd325e66be006c97632a /lua/pets/pet.lua
parentchore: merge dev (diff)
feat(popup): popup options / hopefully fix black square
Diffstat (limited to 'lua/pets/pet.lua')
-rw-r--r--lua/pets/pet.lua18
1 files changed, 1 insertions, 17 deletions
diff --git a/lua/pets/pet.lua b/lua/pets/pet.lua
index 0cdd77b..5f5dbc4 100644
--- a/lua/pets/pet.lua
+++ b/lua/pets/pet.lua
@@ -3,22 +3,6 @@ local M = {}
M.Pet = {}
M.Pet.__index = M.Pet
-local popup_opts = {
- position = {
- row = "100%",
- col = "100%",
- },
- size = {
- width = "30%",
- height = 10,
- },
- focusable = false,
- enter = false,
- win_options = {
- winblend = 100,
- },
-}
-
-- @param name the actual name for the pet
-- @param type the species of the pet e.g. cat
-- @param style the color/style of the pet e.g. brown
@@ -34,7 +18,7 @@ function M.Pet.new(name, type, style, user_opts)
local wd = debug.getinfo(1).source:sub(2):match("(.*nvim/)") .. "media/"
instance.sourcedir = wd .. type .. "/" .. style .. "/"
- instance.popup = require("nui.popup")(popup_opts)
+ instance.popup = require("nui.popup")(user_opts.popup)
instance.animation =
require("pets.animations").Animation.new(instance.sourcedir, type, style, instance.popup, user_opts)
return instance