Update neotree to auto-close upon file selection
This commit is contained in:
parent
4ab8d98e81
commit
2a11da6360
1 changed files with 29 additions and 20 deletions
|
@ -1,22 +1,31 @@
|
|||
return {
|
||||
"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", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||
},
|
||||
lazy = false, -- neo-tree will lazily load itself
|
||||
opts = {
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = true,
|
||||
-- hide_dotfiles = false,
|
||||
hide_by_name = {
|
||||
'.git'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"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", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||
},
|
||||
lazy = false, -- neo-tree will lazily load itself
|
||||
opts = {
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = true,
|
||||
-- hide_dotfiles = false,
|
||||
hide_by_name = {
|
||||
".git",
|
||||
},
|
||||
},
|
||||
},
|
||||
event_handlers = {
|
||||
{
|
||||
event = "file_opened",
|
||||
handler = function(file_path)
|
||||
--auto close neo-tree when file is opened
|
||||
vim.cmd("Neotree close")
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue