yadm-config/.config/nvim/lua/plugins/snacks.lua

28 lines
503 B
Lua

local explorerConfig = {
actions = {
openWithApp = function(picker)
local path = picker:current().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,
},
}