refactor(nvim): replace bufdelete.nvim
with snacks.nvim
bufdelete
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled
This commit is contained in:
parent
420147c5ca
commit
3fb82ca44e
@ -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" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -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 {
|
return {
|
||||||
{
|
{
|
||||||
"folke/snacks.nvim",
|
"folke/snacks.nvim",
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
lazy = false,
|
lazy = false,
|
||||||
keys = {
|
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",
|
"<leader>nd",
|
||||||
function()
|
function()
|
||||||
@ -30,7 +55,7 @@ return {
|
|||||||
margin = { top = 1 },
|
margin = { top = 1 },
|
||||||
},
|
},
|
||||||
words = { enabled = true },
|
words = { enabled = true },
|
||||||
statuscolumn = { enabled = false }
|
statuscolumn = { enabled = false },
|
||||||
})
|
})
|
||||||
_G.bt = snacks.debug.backtrace
|
_G.bt = snacks.debug.backtrace
|
||||||
_G.dd = snacks.debug.inspect
|
_G.dd = snacks.debug.inspect
|
||||||
|
Loading…
Reference in New Issue
Block a user