local map = vim.keymap.set local function with_desc(desc) return { noremap = true, silent = true, desc = desc } end map("n", "", function() Snacks.picker.files() end, with_desc("Find files")) map("n", "gf", function() Snacks.picker.git_files() end, with_desc("Find git files")) map("n", "pr", function() Snacks.picker.recent() end, with_desc("Recent files")) map("n", "ps", function() Snacks.picker.grep() end, with_desc("Live grep")) map("n", "sb", function() Snacks.picker.grep_word() end, with_desc("Grep word under cursor")) map("n", "pf", function() Snacks.picker.explorer() end, with_desc("File explorer (cwd)")) map("n", "cf", function() Snacks.picker.explorer({ cwd = vim.fn.expand("%:p:h") }) end, with_desc("File explorer (current file dir)"))