Skip to content

Commit 81b8a91

Browse files
committed
cleanup: remove deprecated trash_command
1 parent 78ed0cf commit 81b8a91

File tree

4 files changed

+2
-62
lines changed

4 files changed

+2
-62
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- stevearc-*
78
pull_request:
89
branches:
910
- master

lua/oil/adapters/files.lua

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ local fs = require("oil.fs")
66
local git = require("oil.git")
77
local log = require("oil.log")
88
local permissions = require("oil.adapters.files.permissions")
9-
local trash = require("oil.adapters.files.trash")
109
local util = require("oil.util")
1110
local uv = vim.uv or vim.loop
1211

@@ -620,15 +619,7 @@ M.perform_action = function(action, cb)
620619
end
621620

622621
if config.delete_to_trash then
623-
if config.trash_command then
624-
vim.notify_once(
625-
"Oil now has native support for trash. Remove the `trash_command` from your config to try it out!",
626-
vim.log.levels.WARN
627-
)
628-
trash.recursive_delete(path, cb)
629-
else
630-
require("oil.adapters.trash").delete_to_trash(path, cb)
631-
end
622+
require("oil.adapters.trash").delete_to_trash(path, cb)
632623
else
633624
fs.recursive_delete(action.entry_type, path, cb)
634625
end

lua/oil/adapters/files/trash.lua

Lines changed: 0 additions & 44 deletions
This file was deleted.

lua/oil/config.lua

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ default_config.view_options.highlight_filename = nil
224224
---@class oil.Config
225225
---@field adapters table<string, string> Hidden from SetupOpts
226226
---@field adapter_aliases table<string, string> Hidden from SetupOpts
227-
---@field trash_command? string Deprecated option that we should clean up soon
228227
---@field silence_scp_warning? boolean Undocumented option
229228
---@field default_file_explorer boolean
230229
---@field columns oil.ColumnSpec[]
@@ -403,13 +402,6 @@ local M = {}
403402
M.setup = function(opts)
404403
opts = opts or {}
405404

406-
if opts.trash_command then
407-
vim.notify(
408-
"[oil.nvim] trash_command is deprecated. Use built-in trash functionality instead (:help oil-trash).\nCompatibility will be removed on 2025-06-01.",
409-
vim.log.levels.WARN
410-
)
411-
end
412-
413405
local new_conf = vim.tbl_deep_extend("keep", opts, default_config)
414406
if not new_conf.use_default_keymaps then
415407
new_conf.keymaps = opts.keymaps or {}

0 commit comments

Comments
 (0)