1
0
Fork 0
mirror of https://codeberg.org/Mo8it/dotfiles.git synced 2024-12-30 20:53:39 +00:00

Trash instead of delete

This commit is contained in:
Mo8it 2022-04-04 01:46:45 +02:00
parent 1eb5c7929b
commit 2886053c61
2 changed files with 9 additions and 0 deletions

View file

@ -7,5 +7,13 @@ require("neo-tree").setup({
hide_dotfiles = false,
hide_gitignored = false,
},
commands = {
-- Override delete to use trash instead of rm
delete = function(state)
local path = state.tree:get_node().path
print(vim.fn.system({ "trash", vim.fn.fnameescape(path) }))
require("neo-tree.sources.manager").refresh(state.name)
end,
},
},
})

View file

@ -1,4 +1,5 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
OhMyREPL = "5fb14364-9ced-5910-84b2-373655c76a03"
Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"