How to show hidden files by default? #353
Replies: 5 comments 17 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 |
Beta Was this translation helpful? Give feedback.
-
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! |
Beta Was this translation helpful? Give feedback.
-
@gldtn welcome onboard. You need |
Beta Was this translation helpful? Give feedback.
-
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,
} |
Beta Was this translation helpful? Give feedback.
-
alternatively you could toggle show hidden files by pressing shift + T |
Beta Was this translation helpful? Give feedback.
-
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 forH
to 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...
Beta Was this translation helpful? Give feedback.
All reactions