chadtree
chadtree copied to clipboard
chadtree breaks directory argument
When you open neovim with a directory argument such as nvim . instead of opening the pertinent directory tree it starts editing a new file with the name '.'.
Expected behavior: chadtree should open as a unique panel, or at least leave the built-in file system explorer to work.
oh ok, that makes sense, i will edit that
Bump. Can you please look into this? I am also unable to Ctrl-W + F on filepaths in text files which earlier used to open the file browser (vim/neovim inbuilt or nerdtree)
You can fix this behavior with the following augroup:
function! ToggleFileTree() abort
:CHADopen
:AirlineRefresh
endfunction
augroup OpenCHADTreeIfDirectoryArgProvided
autocmd!
...
autocmd VimEnter * if argc() == 1 && isdirectory(argv(0)) | call ToggleFileTree() | endif
augroup END