I would like the tree to auto open when I do vim $DIR but not when I do vim, is that currently possible?
Hi, it is not yet possible, although if you use something like 'startify', you could set let g:nvim_tree_auto_ignore_ft = { 'startify' }
@AckslD This can be set up with an autocommand:
augroup NvimTreeConfig
au!
au BufEnter * if isdirectory(expand('%')) | exec("cd " . expand('%')) | exec('NvimTreeOpen') | endif
augroup END
lua << EOF
require'nvim-tree.events'.on_nvim_tree_ready(function ()
vim.cmd("NvimTreeRefresh")
end)
EOF
i like your hacks @sindrets :) but i think it should be a feature anyway, the auto_open could be easily extended i just didn't spend the time to do that.
Sounds good! But in the meantime, this auto command works fine:)
Thanks for sharing @sindrets :)
Most helpful comment
Sounds good! But in the meantime, this auto command works fine:)