cd to folder when doing nvim FOLDER and layout code
- when doing `nvim FOLDER` it works as expected, opening the tree on the correct folder (updating the ROOT_PATH) - add the code for keeping the tree window on the side no matter what, but since the lack of window events, disable this feature.
This commit is contained in:
@@ -12,6 +12,12 @@ au BufWritePost * lua require'tree'.refresh()
|
||||
au BufEnter * lua require'tree'.check_windows_and_close()
|
||||
au VimEnter * lua require'tree'.check_buffer_and_open()
|
||||
|
||||
" TODO: WinEnter is not the right autocommand for this task,
|
||||
" but we do not have LayoutChange or WinMove kind of option atm,
|
||||
" so this is deactivated by default to avoid messing up users workflows
|
||||
|
||||
" au WinEnter * lua require'tree'.replace_tree()
|
||||
|
||||
command! LuaTreeToggle lua require'tree'.toggle()
|
||||
command! LuaTreeRefresh lua require'tree'.refresh()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user