refacto: move toggle help and filter toggles into actions
also fix explorer to properly remove element on update when filter is applied
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
local utils = require'nvim-tree.utils'
|
||||
local view = require'nvim-tree.view'
|
||||
local diagnostics = require'nvim-tree.diagnostics'
|
||||
local config = require"nvim-tree.config"
|
||||
local lib = function() return require'nvim-tree.lib' end
|
||||
|
||||
local M = {}
|
||||
@@ -103,4 +104,13 @@ function M.sibling(direction)
|
||||
end
|
||||
end
|
||||
|
||||
function M.find_git_item(where)
|
||||
local icon_state = config.get_icon_state()
|
||||
local flags = where == 'next' and 'b' or ''
|
||||
local icons = table.concat(vim.tbl_values(icon_state.icons.git_icons), '\\|')
|
||||
return function()
|
||||
return icon_state.show_git_icon and vim.fn.search(icons, flags)
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user