Shell environment initializers and docker containers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

51 lines
1.4 KiB

-- shell-inits: snacks.nvim tweaks - explorer/picker visibility, notifications
return {
"folke/snacks.nvim",
opts = {
notifier = {
timeout = 10000,
},
picker = {
hidden = true,
ignored = true,
sources = {
explorer = {
lazy = true,
hidden = true,
ignored = true,
exclude = {
"**/.git",
"**/.DS_Store",
},
-- Yank paths from the explorer: Y relative, gy absolute
win = {
list = {
keys = {
["Y"] = "copy_relative",
["gy"] = "copy_absolute",
["L"] = { { "pick_win", "jump" }, mode = { "n", "i" } },
},
},
},
actions = {
copy_absolute = function(_, item)
local path = item.file
vim.fn.setreg('"', path)
vim.fn.setreg("+", path)
Snacks.notify.info("Copied absolute path: " .. path)
end,
copy_relative = function(_, item)
local path = vim.fn.fnamemodify(item.file, ":.")
vim.fn.setreg('"', path)
vim.fn.setreg("+", path)
Snacks.notify.info("Copied relative path: " .. path)
end,
},
},
files = {
hidden = true,
},
},
},
},
}