Open
Description
Did you check docs and existing issues?
- I have read all the docs.
- I have searched the existing issues.
- I have searched the existing discussions.
Neovim Version (nvim -v)
0.10.1
Operating System / Version
MacOS 14.5
Describe the Bug
neo-tree doesn't support restoring the explorer buffer when opening a vim session (#128), but there is an option to auto-clean those on opening a session (#778). For neovide, the clean-up doesn't work:
Screenshots, Traceback
Steps to Reproduce
- Open any file in neovide
- Open neo-tree buffer
:mksession
- open a new neovide
:source Session.vim
Expected Behavior
The neotree buffer is closed on session load
Your Configuration
-- Navigation
{
"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",
"s1n7ax/nvim-window-picker",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
},
event = {
"VeryLazy",
},
keys = {
{ "<c-n>", "<cmd>Neotree toggle<cr>", mode={"n", "v"}, desc = "Neotree toggle" },
{ "<c-i>", "<cmd>Neotree toggle reveal<cr>", desc = "Neotree current file" },
{ "<leader>b", "<cmd>Neotree toggle show buffers right<cr>", desc = "Neotree buffers" },
},
opts = {
auto_clean_after_session_restore = true, -- Automatically clean up broken neo-tree buffers saved in sessions
window = {
width = 45,
side = "left",
-- :help neo-tree-mappings
mappings = {
["<CR>"] = "open",
["<C-CR>"] = "open_with_window_picker",
["."] = "set_root",
["l"] = "open",
["h"] = "close_node",
["H"] = "navigate_up",
["<C-x>"] = "open_split",
["s"] = "open_vsplit",
["I"] = "toggle_hidden",
-- the fuzzy-finder is redundant, there is Telescope
["/"] = "noop",
["P"] = { "toggle_preview", config = { use_float = false, use_image_nvim = true } },
},
},
},
},