Closed fgheng closed 2 years ago
Cannot replicate with 483f155
I see you have some customisations in that picture. Please confirm the bug using nvim -nu /tmp/nvt-min.lua
.
NVIM v0.8.0-dev+95-g07660193a
Please try with the stable 0.7.0 release.
Using neovim 0.7 and using nvim -nu /tmp/nvt-min.lua
, quertion still exists, look at this picture, I want to close the dir 'vime' (pic1) while the cursor stay on it, but the command 'close node' closed vime's parent node 'lua' (pic2).
pic1 pic2
what I wanted is that if the cursor on a dir node, close it rather than close its parent like pic3
pic3
NVIM v0.7.0 Build type: Release LuaJIT 2.1.0-beta3 Compiled by runner@fv-az316-460
I understand. You are using close_node
; I was using edit
. That is expected behaviour for close_node
.
I think you might want a new action like close_children
.
I understand. You are using
close_node
; I was usingedit
. That is expected behaviour forclose_node
.I think you might want a new action like
close_children
.
Yes, thank you very much
Hi
I'm currently dealing with the same thing as @fgheng. I think there might have been a change in the behavior of close_node
a little while ago, because I cannot remember this happening before.
What I expect to happen when i call the close_node
action is this: If the cursor is positioned on an open folder, I expect that folder to close. If the current folder is closed, or the cursor is on a file, I expect the parent folder to close.
In the current version of nvim-tree, the parent folder closes regardless of the state of the folder under the cursor.
I'm not sure that a close_children
action will solve this.
Although, if the current behavior of close_node
is the intended one, I would like to request an example of how to setup this functionality in my config.
I'm not sure that a
close_children
action will solve this.
Yes. close_children
would not be that useful.
Although, if the current behavior of
close_node
is the intended one, I would like to request an example of how to setup this functionality in my config.
My "closing" behaviour is simple: use close_node
to collapse the whole directory, edit
to close the focussed directory. Close node mainly when browsing around, edit close when I'm done with a specific directory.
The feature request:
close_node
: If the cursor is positioned on an open folder, I expect that folder to close. If the current folder is closed, or the cursor is on a file, I expect the parent folder to close.
Options:
close_node
behaviourclose_node
It might have changed indeed because i've made a bit of refactoring and very much simplified the original code. I think the behavior can be reinstated easily though :) Can you see #1239 if this fix it back to the original behavior ?
Description
look at this picture
My cursor is at the node of vime, but if I close the node, it not close the vime rather than close the dir lua.
I want to close the dir vime.
Neovim version
Operating system and version
arch linux
nvim-tree version
483f155
Steps to reproduce
always exists
Expected behavior
No response
Actual behavior
No response
Minimal config