refactor(nvim): replace bufdelete.nvim with snacks.nvim bufdelete
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled

This commit is contained in:
Price Hiller 2024-11-11 15:11:40 -06:00
parent 420147c5ca
commit 3fb82ca44e
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB
2 changed files with 26 additions and 26 deletions

View File

@ -1,25 +0,0 @@
vim.api.nvim_create_autocmd("TermOpen", {
callback = function(args)
vim.keymap.set("n", "q", function()
require("bufdelete").bufdelete(0, true)
end, { silent = true, buffer = args.buf, remap = true, desc = "Close Terminal Buffer" })
end,
})
return {
{
"famiu/bufdelete.nvim",
cmd = "Bdelete",
keys = {
{ "<A-x>", "<cmd>Bdelete<cr>", desc = "Close Buffer", mode = { "", "!", "v" } },
{
"<A-x>",
function()
require("bufdelete").bufdelete(0, true)
end,
desc = "Close Buffer",
mode = { "t" },
},
},
},
}

View File

@ -1,9 +1,34 @@
vim.api.nvim_create_autocmd("TermOpen", {
callback = function(args)
vim.keymap.set("n", "q", function()
require("snacks").bufdelete.delete({ force = true })
end, { silent = true, buffer = args.buf, remap = true, desc = "Close Terminal Buffer" })
end,
})
return {
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
keys = {
{
"<A-x>",
function()
require("snacks").bufdelete.delete()
end,
desc = "Close Buffer",
mode = { "", "!", "v" },
},
{
"<A-x>",
function()
require("snacks").bufdelete.delete({ force = true })
end,
desc = "Close Buffer",
mode = { "t" },
},
{
"<leader>nd",
function()
@ -30,7 +55,7 @@ return {
margin = { top = 1 },
},
words = { enabled = true },
statuscolumn = { enabled = false }
statuscolumn = { enabled = false },
})
_G.bt = snacks.debug.backtrace
_G.dd = snacks.debug.inspect