aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorGiuseppe Gadola <giusgadola@gmail.com>2023-02-12 12:27:22 +0100
committerGiuseppe Gadola <giusgadola@gmail.com>2023-02-12 12:27:22 +0100
commit3e9a930ba9af1c899a26043442d64093ad0eab4d (patch)
treef760eeb769ea1926c08281441bba2db39c0dadd1 /lua
parentfeat(utils): added option to suppress listdir's error message (diff)
refactor(errors): changed the way error messages are sent
Diffstat (limited to 'lua')
-rw-r--r--lua/pets.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/pets.lua b/lua/pets.lua
index 3fd5a98..fd71b2b 100644
--- a/lua/pets.lua
+++ b/lua/pets.lua
@@ -26,7 +26,7 @@ end
-- create a Pet object and add it to the pets table
function M.create_pet(name, type, style)
if M.pets[name] ~= nil then
- vim.api.nvim_err_writeln("Name already in use")
+ vim.notify("Name already in use", vim.log.levels.WARN)
return
end
local pet = require("pets.pet").Pet.new(name, type, style, M.options)
@@ -39,7 +39,7 @@ function M.kill_pet(name)
M.pets[name]:kill()
M.pets[name] = nil
else
- vim.api.nvim_err_writeln("Pet name not found")
+ vim.notify("Pet name not found", vim.log.levels.WARN)
end
end