How to show hidden files by default? #353
Answered
by
nyngwang
bennypowers
asked this question in
Q&A
Replies: 4 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.
16 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 = {
visible = true,
},
},
},
config = function()
vim.keymap.set("n", "<C-b>", "<CMD>Neotree toggle<CR>", {})
end
} Thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
-
@gldtn welcome onboard. You need |
Beta Was this translation helpful? Give feedback.
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,
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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