neovim updates
This commit is contained in:
parent
57c3bb3e61
commit
308bdbebf9
10 changed files with 102 additions and 47 deletions
|
|
@ -34,32 +34,6 @@
|
|||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bc";
|
||||
action.__raw =
|
||||
# lua
|
||||
''
|
||||
function ()
|
||||
local current = vim.api.nvim_get_current_buf()
|
||||
|
||||
local get_listed_bufs = function()
|
||||
return vim.tbl_filter(function(bufnr)
|
||||
return vim.api.nvim_buf_get_option(bufnr, "buflisted")
|
||||
end, vim.api.nvim_list_bufs())
|
||||
end
|
||||
|
||||
for _, bufnr in ipairs(get_listed_bufs()) do
|
||||
if bufnr ~= current
|
||||
then require("mini.bufremove").delete(bufnr)
|
||||
end
|
||||
end
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "Close all buffers but current";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue