feat(live-filter): add ability to live filter out nodes in the tree (#1056)

This commit is contained in:
Kiyan
2022-05-17 10:03:49 +02:00
committed by GitHub
parent 99e32fea14
commit 6343813a35
16 changed files with 312 additions and 102 deletions

View File

@@ -1,5 +1,6 @@
local events = require "nvim-tree.events"
local explorer = require "nvim-tree.explorer"
local live_filter = require "nvim-tree.live-filter"
local view = require "nvim-tree.view"
local M = {}
@@ -28,6 +29,9 @@ function M.get_nodes_starting_line()
if view.is_root_folder_visible(M.get_cwd()) then
offset = offset + 1
end
if live_filter.filter then
return offset + 1
end
return offset
end