sidebar.nvim
sidebar.nvim copied to clipboard
Incorrect Trash Path for MacOS
Describe the bug
The trash_dir variable defined in lua/sidebar-nvim/builtin/files.lua is incorrect for MacOS. This causes an error, since the given path cannot be found. The correct path is $HOME/.Trash/. This means that users on MacOS are unable to delete files using the sidebar.
To Reproduce Steps to reproduce the behavior:
- Open sidebar.nvim in MacOS
- Hover over a file in the sidebar
- Press the
dkey - Observer the error
Expected behavior
Deleted files should be moved to $HOME/.Trash and not raise an error.
Screenshots
Environment (please complete the following information):
- nvim version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1716656478
Run "nvim -V1 -v" for more info
- sidebar config
require("sidebar-nvim").setup({
open = true,
sections = {"files", "todos", "git"},
files = {
show_hidden = true
}
})
vim.keymap.set("n", "<leader>f", vim.cmd.SidebarNvimFocus)
Additional context
I was able to fix this issue on a personal fork by updating trash_dir to be $HOME/.Trash.