nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File or folder displayed twice

ivandzf opened this issue · comments

Problem Summary

file or folder may be displayed twice, but this only happens when I open a project that has git

Information

OS: MacOS 12.0.1
Neovim version: NVIM v0.7.0-dev+662-g73b35ef10
nvim-tree version: 1.6.7
here is my nvim-tree config

require("nvim-tree.events").on_nvim_tree_ready(function()
    vim.cmd("NvimTreeRefresh")
end)

require'nvim-tree'.setup {
    disable_netrw = true,
    hijack_netrw = true,
    open_on_setup = false,
    ignore_ft_on_setup = {"startify", "vista", "undotree"},
    auto_close = true,
    open_on_tab = false,
    update_to_buf_dir = {
        enable = true,
        auto_open = true
    },
    hijack_cursor = false,
    update_cwd = false,
    update_focused_file = {
        enable = false,
        update_cwd = false,
        ignore_list = {}
    },
    system_open = {
        cmd = nil,
        args = {}
    },
    filters = {
        dotfiles = false,
        customs = {".git", "node_modules", ".cache", "vendor"}
    },
    view = {
        width = 40,
        height = 30,
        side = 'right',
        auto_resize = false,
        mappings = {
            custom_only = false,
            list = {}
        }
    },
    git = {enable = true, ignore = true},
    diagnostics = {
        enable = true,
        icons = {hint = "", info = "", warning = "", error = ""}
    }
}

vim.api.nvim_set_keymap("n", "<Leader>t", ":NvimTreeToggle<CR>", {noremap = true, silent = true})

Step to reproduce

  1. just open a project who use git

Screen shot

project has git

Screen Shot 2021-12-02 at 20 26 15

project hasn't git

Screen Shot 2021-12-02 at 20 26 29

just tried to downgrade my neovim version to v0.6.0 but still happens

I'm also seeing this happen when I copy and paste files using the mappings

commented

Hi, sorry for the late answer, does this still happen @ivandzf ?
@mattleong i could not reproduce with copy/paste but it happens sometimes for me in very narrow cases while renaming. I'm not sure what triggers this and i haven't been able to reproduce consistently.

Hi @kyazdani42, just tried to update the plugin, and now it's back to normal again 🎉 thank you so much, i will close this issue.
anyway what happened?

commented

rewrote the reloader module which is now much simpler and works as expected ^^