-
Notifications
You must be signed in to change notification settings - Fork 255
[Feature/Bug] Show hidden files by default #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Though it's not documented, and I'm not sure if it is intentional or not, you can achieve this by adding this to your config: require("neo-tree").setup({
filesystem = {
show_hidden = true, -- show hidden files by default
... That is the flag the |
@levouh The behavior of the "filters" section of the config actually applies to both browsing and the search mode. It may have been clearer to call the search functionality search instead of also referring to it as filtering. As far as I can see, this is working as intended. |
@cseickel The and |
Gotcha, this was the issue. I only saw the text @cseickel I'm happy to submit a mini PR to document this, but would it be easier to do on #60 if the docs method is being reworked? |
Good catch @levouh and @jgottzen! This is the sort of thing I tend to miss because I generally stick with the defaults. The documentation is wrong in this case and I would consider that a bug. Bugs always get fixed first in my book, so I wouldn't hold this up for a larger documentation effort. PRs are welcome! |
To make things more confused, I see that the filter feature (search) is using the flags within in the I think the correct thing to do is to make both situations use the flags within the |
@cseickel Ok, I can do a PR for that, if you want? |
That would be great, thanks! |
Toggle the state.filters.(show_hidden|respect_gitignore) flags, instead of setting them on the root state object.
@cseickel: In case this would be forgotten: the README.md has NOT been updated!
|
@nyngwang I don't think it needs to be. This issue morphed from a request to change the default behavior to a bug fix becuase the code didn't match the existing documentation. The final fix was to update the code to match that documentation but leave the defaults alone. |
@cseickel: How to show the hidden files by default in the current version? In my current case only If the current open buffer is in a hidden directory then only this folder will be revealed. While I want to see all hidden folders by default, and toggle it to not show them when needed. Should I need to hit |
@nyngwang Here is how to change the option and always show hidden files: require("neo-tree").setup({
filesystem = {
filters = {
show_hidden = true,
--respect_gitignore = false,
},
},
}) |
Maybe you could document this in the README.md? Thanks for your help! |
Sure. I was thinking that it was already there but now I realize it's only in the vim help file. I'll include in the readme for the next release. |
Using the following configuration:
I observe that when trying to try to expand a node for a directory that contains only hidden files with
<CR>
, nothing is expanded. The behavior of:is strictly related to filters (e.g.
/
), correct? Or is there a bug there and settingshow_hidden = true
should actually do what is noted here? As it stands right now, without using the (default) mapping ofH
, there is no other way to have this directory (containing only hidden files) expand. From what I can tell, this might just be a matter of things being copied over to the currentstate
correctly, but I' not entirely sure how things are intended to behave.This behavior is shown below:
expand_node_with_only_hidden_files.mp4
The text was updated successfully, but these errors were encountered: