-
Notifications
You must be signed in to change notification settings - Fork 271
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)
NVIM v0.12.0-dev
Operating System / Version
Pop-Os/Ubuntu 22.04 LTS
Describe the Bug
Detailed:
When you use the sidebar panel to do a copy via the "c" command and copy to a dir out of the parent dir it symlinks the parent into the folder you are copying from on "..". It is done as a hidden file but when doing dev work I always show hidden files cause of files like ".gitignore". It does go away when you close all of nvim and reopen nvim.
Unfortunately I did not realize it was a symlink until I deleted the symlinked folder and it deleted everything in the parent dir. Then I had the wonderful time of trying to recover work deleted with "rm"
I am basically using the https://github.com/nvim-lua/kickstart.nvim config setup, though I have done some tweaking but I have not really messed with neo-tree in there beyond showing hidden files
Screenshots, Traceback
Steps to Reproduce
Have hidden files set to visible
copy a file from one dir to another dir where you traverse up the tree using a ".." in your path
Expected Behavior
It should not leave a symlink in the copy from dir even if it is hidden.
This leaves open the real possibility that if people are moving a file out of a dir and then delete the dir that it can have a much wider impact than the user intended.
Your Configuration
-- template from https://lazy.folke.io/developers#reprolua, feel free to replace if you have your own minimal init.lua
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x", -- or "main"
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- { "3rd/image.nvim", opts = {} }, -- Optional image support
},
lazy = false,
---@module "neo-tree"
---@type neotree.Config?
opts = {
-- fill any relevant options here
},
}
},
})
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>e", "<Cmd>Neotree<CR>")
-- do anything else you need to do to reproduce the issue