Public Access
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0e45a6dec | ||
|
|
18931930a2 | ||
|
|
dda48dc457 | ||
|
|
cbe9447671 |
@@ -2,6 +2,7 @@ local M = {}
|
||||
|
||||
function M.close_hidden()
|
||||
local visible_buffers = {}
|
||||
local closed_count = 0
|
||||
|
||||
for _, tabpage in ipairs(vim.api.nvim_list_tabpages()) do
|
||||
for _, window in ipairs(vim.api.nvim_tabpage_list_wins(tabpage)) do
|
||||
@@ -12,8 +13,17 @@ function M.close_hidden()
|
||||
for _, buffer in ipairs(vim.api.nvim_list_bufs()) do
|
||||
if vim.bo[buffer].buflisted and not visible_buffers[buffer] then
|
||||
vim.api.nvim_buf_delete(buffer, { force = true })
|
||||
end
|
||||
closed_count = closed_count + 1
|
||||
end
|
||||
end
|
||||
|
||||
if closed_count == 0 then
|
||||
vim.notify("No hidden buffers to close", vim.log.levels.INFO)
|
||||
return
|
||||
end
|
||||
|
||||
local buffer_label = closed_count == 1 and "buffer" or "buffers"
|
||||
vim.notify(string.format("Closed %d hidden %s", closed_count, buffer_label), vim.log.levels.INFO)
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
@@ -9,4 +9,4 @@ require("romanzy.plugins.nvim-treesitter")
|
||||
require("romanzy.plugins.conform")
|
||||
require("romanzy.plugins.lsp")
|
||||
require("romanzy.plugins.codamheader")
|
||||
require("romanzy.plugins.romanzy")
|
||||
require("romanzy.custom.tabline").setup()
|
||||
|
||||
@@ -6,9 +6,10 @@ vim.pack.add({
|
||||
},
|
||||
})
|
||||
|
||||
local icons = require("mini.icons")
|
||||
local input = require("mini.input")
|
||||
local clue = require("mini.clue")
|
||||
local completion = require("mini.completion")
|
||||
local icons = require("mini.icons")
|
||||
local files = require("mini.files")
|
||||
local git = require("mini.git")
|
||||
local diff = require("mini.diff")
|
||||
@@ -20,6 +21,20 @@ local ai = require("mini.ai")
|
||||
local notify = require("mini.notify")
|
||||
local surround = require("mini.surround")
|
||||
|
||||
icons.setup({})
|
||||
|
||||
local input_view = input.gen_view.floatwin({
|
||||
-- other interesting symbols for the caret `▏` `⎕` `░` `▒` `▓`
|
||||
to_chunks = function(state, max_width)
|
||||
return input.state_to_chunks(state, max_width, {
|
||||
include_prompt = false,
|
||||
include_hint = false,
|
||||
symbol_caret = "█",
|
||||
})
|
||||
end,
|
||||
})
|
||||
input.setup({ handlers = { view = input_view } })
|
||||
|
||||
clue.setup({
|
||||
triggers = {
|
||||
{ mode = "n", keys = "<leader>" },
|
||||
@@ -41,8 +56,6 @@ clue.setup({
|
||||
},
|
||||
})
|
||||
|
||||
icons.setup({})
|
||||
|
||||
files.setup(require("romanzy.custom.mini_files").setup())
|
||||
|
||||
git.setup({})
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
require("romanzy.custom.tabline").setup()
|
||||
Reference in New Issue
Block a user