Skip to content

Commit cf828e0

Browse files
committed
fix: export find_file, remove global options, disable follow by default
1 parent 3bcfc70 commit cf828e0

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

lua/lib/lib.lua

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ M.Tree = {
2121
bufnr = nil,
2222
winnr = nil,
2323
buf_options = {
24-
'sidescroll=5',
2524
'noswapfile',
26-
'splitbelow',
27-
'noruler',
28-
'noshowmode',
29-
'noshowcmd'
3025
},
3126
win_options = {
3227
relativenumber = false,

lua/tree.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ local function is_file_readable(fname)
8989
return true
9090
end
9191

92-
local function find_file()
92+
function M.find_file()
9393
local bufname = api.nvim_buf_get_name(api.nvim_get_current_buf())
9494
if not is_file_readable(bufname) then return end
9595

@@ -122,8 +122,8 @@ end
122122

123123
function M.buf_enter()
124124
update_root_dir()
125-
if vim.g.lua_tree_follow ~= 0 then
126-
find_file()
125+
if vim.g.lua_tree_follow == 1 then
126+
M.find_file()
127127
end
128128
end
129129

0 commit comments

Comments
 (0)