Hey @kyazdani42, since rewrite of view library I am having trouble setting up autocommand for NvimTree.
I tried
BufWinEnter NvimTree but it does not seem to be triggered on require "nvim-tree".find_file(true) (also tried BufEnter and WinEnter)FileType NvimTree but it gets triggered as soon as the plugin initialises even without opening tree buffer (so affects the buffer I don't want it to affect).(Edit): It also seem to be not triggering auto commands such as BufLeave,BufWinLeave,WinClosed NvimTree when file is selected with enter or with <c-{x,v}.
What would be the correct way of doing it now?
Also, I have a very minor issue with express_line, plugin from @tjdevries setting up status line. It works just fine except for nvim-tree buffer, where it fails to set statusline on initial window opening. If I then switch windows and come back to Nvim-tree's one it does set statusline as expected. But opening, closing and opening Nvim-trees window does not work. Would you happen to know if that is an issue with express_line or nvim-tree?
hmmm, well i've changed a bit the way the buffer/window handling is working. Basically i now create the buffer whenever the plugin is loaded, which i never destroy. BufEnter should work though. I never destroy the plugin because i use nvim_hide_win instead of nvim_close_win which does not delete the underlying buffer but only hides it, which might cause BufWinLeave, WinClosed command to never be called.
maybe nvim-tree is loading before the express_line plugin which will not add a status line to the window ? i'm not sure but i've notice my own status line has an issue removing it from the nvim-tree window as i want it too, i'm going to investigate this issue.
When I open a file via
After update, it works, thank you @kyazdani42
BufLeave,WinClose NvimTree is working again, awesome @kyazdani42 , thanks! But WinEnter,BufWinEnter NvimTree seems not to be triggered still.
yep i'll do a bit more debugging tonight because this issue bothers me a little, i'm not sure where this comes from.
haven't managed to get why the BufWinEnter doesn't trigger in nvim-tree's window :/ could it be that ?
nvim_win_set_buf({window}, {buffer}) *nvim_win_set_buf()*
Sets the current buffer in a window, without side-effects
WinEnter works fine though with NvimTree.
yup this was the culprit, pushing the last fix !
Works perfect, thank you very much!
@kyazdani42 how about statusline issue? I know it's pretty minor. 馃榾
Should I create separate one or would you mind reopening this one?
Thanks for all your great work!
hum mine is working fine, i'm going to investigate. Reopening this in the meantime
It works fine now, after some updates today. Thanks and apologise for the noise. Last issue before reaching perfection is git root detection. There is other ticket for it though.
You rock buddy!
Most helpful comment
It works fine now, after some updates today. Thanks and apologise for the noise. Last issue before reaching perfection is git root detection. There is other ticket for it though.
You rock buddy!