Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug? nvim quits on_tree_change when the nvim-tree plugin is installed #75

Open
lpanebr opened this issue Dec 25, 2021 · 5 comments
Open

Comments

@lpanebr
Copy link

lpanebr commented Dec 25, 2021

I was trying the nvim-tree plugin which is a nerdTree-like but 100% lua.
I know you are a netrw user but some of us mere mortals like the fuzz and whistles of those file browsers.
Also given that you're THE Primeagem coconut oil supreme vim master, this is most likely a nvim-tree bug, of course. But I though I'd let you know anyway.
For now I've fixed the problem by uninstalling nvim-tree. ;-)
Thanks for this great plugin!

@Ceres445
Copy link

Can reproduce, switch_tree didn’t work when nvim-tree was enabled, I disabled nvim-tree and it started working,

    update_focused_file = {
        enable = true,
        update_cwd = true
    },

in nvim-tree.setup() seems to be the problem, i switched it to

    update_focused_file = {
        enable = false,
        update_cwd = true
    },

and switch_tree started working

@lpanebr
Copy link
Author

lpanebr commented Dec 29, 2021

Thanks @Ceres445 . I confirm the config workaround seems good.

@venc0r
Copy link

venc0r commented Feb 1, 2022

Same for me, you don't want to have auto_close enabled, too. (it does what it's supposed to do)

require'nvim-tree'.setup {
    auto_close = true
...

@punk-dev-robot
Copy link

I also have this problem, update_focused_fiel is very useful function in nvim-tree though, so this workaround would not work for me

@RobertBrunhage
Copy link

RobertBrunhage commented Jul 6, 2022

I have the following config but still seem to get weird issues with the file explorer not updating the path when switching trees. Anyone that have a working solution that could share theirs?

vim.opt.splitright = true
require'nvim-tree'.setup {
  update_focused_file = {
      enable = false,
      update_cwd = true
  },
}

Edit: The best solution I found was to also add the following so neovim opens netrw by default and when in folders I can still open nvim-tree. The only issue is that just opening nvim-tree will open the initial worktree but using the "open file in explorer" will open the correct worktree.

  disable_netrw = false,
  hijack_netrw = false,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants