fix: deal with deprecated util methods

This commit is contained in:
Folke Lemaitre 2024-11-07 15:33:32 +01:00
parent 93a5323ba6
commit d455a7f8ce
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
7 changed files with 123 additions and 106 deletions

View file

@ -1,10 +1,5 @@
---@class lazyvim.util.terminal
---@overload fun(cmd: string|string[], opts: snacks.terminal.Opts): snacks.terminal
local M = setmetatable({}, {
__call = function(m, ...)
return m.open(...)
end,
})
local M = {}
---@param shell? string
function M.setup(shell)
@ -37,12 +32,4 @@ function M.setup(shell)
end
end
-- Opens a floating terminal (interactive by default)
---@deprecated use Snacks.terminal instead
---@param cmd? string[]|string
---@param opts? snacks.terminal.Opts
function M.open(cmd, opts)
return Snacks.terminal(cmd, opts)
end
return M