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,
|
end,
|
||||||
desc = "copy path to clipboard",
|
desc = "copy path to clipboard",
|
||||||
},
|
},
|
||||||
["O"] = vim.ui.open and {
|
["O"] = {
|
||||||
function(state)
|
function(state)
|
||||||
local path = state.tree:get_node().path
|
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
||||||
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
|
|
||||||
end,
|
end,
|
||||||
desc = "open with system default application",
|
desc = "open with system application",
|
||||||
} or nil,
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
default_component_configs = {
|
default_component_configs = {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue