Updated nvim setup
This commit is contained in:
parent
5e1b2c1569
commit
1699bd2574
5 changed files with 35 additions and 51 deletions
28
.config/nvim/lua/plugins/snacks.lua
Normal file
28
.config/nvim/lua/plugins/snacks.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
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,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue