mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 02:38:46 +00:00
feat(picker): added inspect
action mapped to <c-i>
. Useful to see what search fields are available on an item.
This commit is contained in:
parent
5582a84020
commit
2ba165b826
2 changed files with 6 additions and 0 deletions
|
@ -205,6 +205,10 @@ function M.preview_scroll_up(picker)
|
|||
picker.preview.win:scroll(true)
|
||||
end
|
||||
|
||||
function M.inspect(picker, item)
|
||||
Snacks.debug.inspect(item)
|
||||
end
|
||||
|
||||
function M.toggle_live(picker)
|
||||
if not picker.opts.supports_live then
|
||||
Snacks.notify.warn("Live search is not supported for `" .. picker.source_name .. "`", { title = "Snacks Picker" })
|
||||
|
|
|
@ -121,6 +121,7 @@ local defaults = {
|
|||
["/"] = "toggle_focus",
|
||||
["q"] = "close",
|
||||
["?"] = "toggle_help",
|
||||
["<c-i>"] = { "inspect", mode = { "n", "i" } },
|
||||
["<a-m>"] = { "toggle_maximize", mode = { "i", "n" } },
|
||||
["<a-p>"] = { "toggle_preview", mode = { "i", "n" } },
|
||||
["<a-w>"] = { "cycle_win", mode = { "i", "n" } },
|
||||
|
@ -166,6 +167,7 @@ local defaults = {
|
|||
["<S-Tab>"] = "select_and_prev",
|
||||
["<Down>"] = "list_down",
|
||||
["<Up>"] = "list_up",
|
||||
["<c-i>"] = "inspect",
|
||||
["<c-d>"] = "list_scroll_down",
|
||||
["<c-u>"] = "list_scroll_up",
|
||||
["zt"] = "list_scroll_top",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue