Popup notification vscode style.
Packer.nvim
use {
"dssste/stack-box.nvim",
config = function()
require("stack-box").setup()
end,
}
local stack_box = require("stack-box")
stack_box.notification("this is a normal message")
stack_box.notification({"this is a normal message", "with two lines"})
stack_box.notification("this is a warning message", "warning")
stack_box.notification("this is an error message", "error")
For example when you keep pressing the wrong buttons:
vim.keymap.set("n", "<leader>gg", function ()
require("stack-box").notification({"git status command remapped to <c-g>"}, "error")
end)
And to close all boxes:
require("stack-box").close_all_windows()