Skip to content

Broken Nvim-tree directory changes #3043

Closed Answered by KoshulaDora
KoshulaDora asked this question in Q&A
Discussion options

You must be logged in to vote

I asked chatgpt and its suggestion of adding these:

require("nvim-tree").setup({
  update_focused_file = {
    enable = true,        -- Enables the update for the focused file
    update_cwd = true,    -- Changes the tree's directory to the file's directory
    ignore_list = {},     -- List of filetypes to ignore
  },
  respect_buf_cwd = true, -- Ensures the tree respects the current buffer's cwd
  sync_root_with_cwd = true, -- Syncs the tree root with Neovim's cwd
})

Seems to solve the issue. I am putting this here for anyone else who is puzzled by the updates as I have been.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by KoshulaDora
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant