fix(trash): wire up delete.trash config to intercept file deletions #42

Merged
barrettruth merged 1 commit from fix/delete-trash-config into main 2026-04-04 15:06:29 +00:00
barrettruth commented 2026-04-04 15:01:59 +00:00

Summary

  • Wrap files.perform_action to redirect deletes to trash when config.delete.trash is true
  • Wrap files.render_action to show "TRASH" instead of "DELETE" in confirmation
  • Update README and vimdoc: delete_to_trashdelete = { trash = true }

Requires barrettruth/canola.nvim#291 for the delete.trash config field.

cc @llakala — the config key changed from the old delete_to_trash to
delete = { trash = true }, nesting it with the other delete options
(wipe, recursive).

Test plan

  • Set delete = { trash = true } in vim.g.canola
  • Delete a file in canola, confirm dialog shows "TRASH" not "DELETE"
  • File appears in freedesktop trash (~/.local/share/Trash/)
  • Without the flag, deletions are permanent as before

Closes #40

## Summary - Wrap `files.perform_action` to redirect deletes to trash when `config.delete.trash` is true - Wrap `files.render_action` to show "TRASH" instead of "DELETE" in confirmation - Update README and vimdoc: `delete_to_trash` → `delete = { trash = true }` Requires barrettruth/canola.nvim#291 for the `delete.trash` config field. cc @llakala — the config key changed from the old `delete_to_trash` to `delete = { trash = true }`, nesting it with the other delete options (`wipe`, `recursive`). #### Test plan - [x] Set `delete = { trash = true }` in `vim.g.canola` - [x] Delete a file in canola, confirm dialog shows "TRASH" not "DELETE" - [x] File appears in freedesktop trash (`~/.local/share/Trash/`) - [x] Without the flag, deletions are permanent as before Closes #40
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/canola-collection!42
No description provided.