diff --git a/README.md b/README.md index 654d2d3..6f7ce40 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ local bridge_settings = { scroll_sync = false, -- See "Sync of buffer scrolling" section below cert_path = nil, -- See "SSL configuration" section below warnings = true, -- Show misconfiguration warnings - picker = "telescope", -- Picker to use with ObsidianBridgePickCommand ("telescope" | "fzf_lua") + picker = "telescope", -- Picker to use with ObsidianBridgePickCommand ("telescope" | "fzf_lua" | "snacks") } -- If you are using lazy in your config, diff --git a/lua/obsidian-bridge/network.lua b/lua/obsidian-bridge/network.lua index 165187a..c2b98db 100644 --- a/lua/obsidian-bridge/network.lua +++ b/lua/obsidian-bridge/network.lua @@ -116,6 +116,20 @@ M.pickers = { fzf_lua.fzf_exec(vim.tbl_keys(command_name_id_map), opts) end, }, + snacks = { + requires = "snacks", + display_name = "snacks.nvim", + pick = function(command_name_id_map, cb) + local items = vim.tbl_keys(command_name_id_map) + Snacks.picker.select(items, { + Prompt = "Obsidian Commands", + }, function(selected) + if selected then + cb(command_name_id_map[selected]) + end + end) + end, + }, } M.pick_command = function(final_config, api_key)