How to show hidden files by default? #353
Answered
by
nyngwang
bennypowers
asked this question in
Q&A
Replies: 6 comments 23 replies
require('neo-tree').setup {
filesystem = {
filtered_items = {
visible = true, -- This is what you want: If you set this to `true`, all "hide" just mean "dimmed out"
hide_dotfiles = false,
hide_gitignored = true,
},
-- unrelated |
19 replies
Answer selected by
bennypowers
|
Can someone point me to the right direction? All .dotfiles are still being hidden, I'm completely new to Nvim and slowly trying to configure it. This is what I have on my neotree.lua file: return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
opts = {
filesystem = {
filtered_items = {
hide_dotfiles = false,
visible = true,
},
},
},
config = function(_, opts)
require("neo-tree").setup(opts)
vim.keymap.set("n", "<C-b>", "<CMD>Neotree toggle<CR>", {})
end
}This has been edited 10/23/24, the code above should work! Thank you! |
0 replies
|
@gldtn welcome onboard. You need |
1 reply
|
Working neo-tree.luareturn {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
},
config = function()
require("neo-tree").setup({
filesystem = {
filtered_items = {
visible = true,
show_hidden_count = true,
hide_dotfiles = false,
hide_gitignored = true,
hide_by_name = {
-- add extension names you want to explicitly exclude
-- '.git',
-- '.DS_Store',
-- 'thumbs.db',
},
never_show = {},
},
},
})
vim.keymap.set("n", "<C-n>", ":Neotree filesystem reveal left<CR>", {})
end,
} |
0 replies
|
alternatively you could toggle show hidden files by pressing shift + T |
0 replies
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Hey!
I like the hidden files feature, but I'd like to toggle them on by default.
In other words, I always find myself hitting
H(orI, then saying "D'oh!", then hittingH) every time I open neo-tree. I'd like the hidden files to be shown automatically, but I'd still like them to render as 'hidden', and forHto toggle them off.Should I just make an autocmd to toggle them on when I enter? I think I'd end up losing the toggle state then when i move back and forth...
All reactions