28 lines
526 B
Lua
28 lines
526 B
Lua
local explorerConfig = {
|
|
actions = {
|
|
openWithApp = function(picker)
|
|
local path = picker:selected({ fallback = true })[1].file
|
|
|
|
local filename = vim.fn.fnamemodify(path, ":t")
|
|
vim.notify(filename, "info", {
|
|
title = "Opening...",
|
|
})
|
|
|
|
os.execute(string.format('xdg-open "%s" &> /dev/null &', path))
|
|
end,
|
|
},
|
|
win = {
|
|
list = {
|
|
keys = {
|
|
["L"] = "openWithApp",
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
return {
|
|
"folke/snacks.nvim",
|
|
opts = {
|
|
picker = explorerConfig,
|
|
},
|
|
}
|