Skip to content

Commit 2f234c5

Browse files
committed
feat(snacks-picker): add snacks.notifier picker if used for notifications
1 parent 0e1cf11 commit 2f234c5

File tree

1 file changed

+5
-0
lines changed
  • lua/astrocommunity/fuzzy-finder/snacks-picker

1 file changed

+5
-0
lines changed

lua/astrocommunity/fuzzy-finder/snacks-picker/init.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ return {
99
"AstroNvim/astrocore",
1010
opts = function(_, opts)
1111
local maps = opts.mappings
12+
local astro = require "astrocore"
1213
maps.n["<Leader>f"] = vim.tbl_get(opts, "_map_sections", "f")
1314
if vim.fn.executable "git" == 1 then
1415
maps.n["<Leader>g"] = vim.tbl_get(opts, "_map_sections", "g")
@@ -52,6 +53,10 @@ return {
5253
maps.n["<Leader>fh"] = { function() require("snacks").picker.help() end, desc = "Find help" }
5354
maps.n["<Leader>fk"] = { function() require("snacks").picker.keymaps() end, desc = "Find keymaps" }
5455
maps.n["<Leader>fm"] = { function() require("snacks").picker.man() end, desc = "Find man" }
56+
if astro.plugin_opts("snacks.nvim").notifier then
57+
maps.n["<Leader>fn"] =
58+
{ function() require("snacks").picker.notifications() end, desc = "Find notifications" }
59+
end
5560
maps.n["<Leader>fo"] = { function() require("snacks").picker.recent() end, desc = "Find old files" }
5661
maps.n["<Leader>fO"] =
5762
{ function() require("snacks").picker.recent { cwd = true } end, desc = "Find old files (cwd)" }

0 commit comments

Comments
 (0)