add FilterTypes named map

This commit is contained in:
Alexander Courtis
2024-11-08 12:39:45 +11:00
parent 67cc06e651
commit 84d5f0a985
4 changed files with 32 additions and 28 deletions

View File

@@ -100,7 +100,7 @@ function Explorer:create_autocmds()
vim.api.nvim_create_autocmd("BufReadPost", {
group = self.augroup_id,
callback = function(data)
if (self.filters.config.filter_no_buffer or self.opts.highlight_opened_files ~= "none") and vim.bo[data.buf].buftype == "" then
if (self.filters.states.no_buffer or self.opts.highlight_opened_files ~= "none") and vim.bo[data.buf].buftype == "" then
utils.debounce("Buf:filter_buffer_" .. self.uid_explorer, self.opts.view.debounce_delay, function()
self:reload_explorer()
end)
@@ -112,7 +112,7 @@ function Explorer:create_autocmds()
vim.api.nvim_create_autocmd("BufUnload", {
group = self.augroup_id,
callback = function(data)
if (self.filters.config.filter_no_buffer or self.opts.highlight_opened_files ~= "none") and vim.bo[data.buf].buftype == "" then
if (self.filters.states.no_buffer or self.opts.highlight_opened_files ~= "none") and vim.bo[data.buf].buftype == "" then
utils.debounce("Buf:filter_buffer_" .. self.uid_explorer, self.opts.view.debounce_delay, function()
self:reload_explorer()
end)