mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix: use lazy's util.open instead
This commit is contained in:
parent
e91fa6eaf5
commit
a95458e1e3
1 changed files with 4 additions and 8 deletions
|
|
@ -69,16 +69,12 @@ return {
|
|||
end,
|
||||
desc = "copy path to clipboard",
|
||||
},
|
||||
["O"] = vim.ui.open and {
|
||||
["O"] = {
|
||||
function(state)
|
||||
local path = state.tree:get_node().path
|
||||
local ret = vim.ui.open(path)
|
||||
if ret and ret.code ~= 0 then
|
||||
require("lazyvim.util").error("Failed to open file: " .. ret.stderr .. "\n .. " .. ret.stdout)
|
||||
end
|
||||
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
||||
end,
|
||||
desc = "open with system default application",
|
||||
} or nil,
|
||||
desc = "open with system application",
|
||||
},
|
||||
},
|
||||
},
|
||||
default_component_configs = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue