Skip to content

BUG: neotree pane is not cleaned in neovide #1552

Open
@danlkv

Description

@danlkv

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

image

Steps to Reproduce

  1. Open any file in neovide
  2. Open neo-tree buffer
  3. :mksession
  4. open a new neovide
  5. :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 } },
                },
            },

        },
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions