#857 add filter_custom action, filter_ignored->filter_git_ignored (#1077)

This commit is contained in:
Alexander Courtis
2022-03-18 21:30:30 +11:00
committed by GitHub
parent b136c7b6f9
commit a50fd77c99
6 changed files with 33 additions and 10 deletions

View File

@@ -180,6 +180,7 @@ local migrations = {
function M.migrate_legacy_options(opts)
local msg = nil
-- g: options
for g, m in pairs(migrations) do
if vim.fn.exists("g:" .. g) ~= 0 then
m(opts)
@@ -190,6 +191,19 @@ function M.migrate_legacy_options(opts)
if msg then
require("nvim-tree.utils").warn(msg)
end
-- regular opts
if opts.view then
if opts.view.mappings then
if opts.view.mappings.list then
for _, m in pairs(opts.view.mappings.list) do
if m.action == "toggle_ignored" then
m.action = "toggle_git_ignored"
end
end
end
end
end
end
return M