mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 11:18:26 +00:00
feat(picker.smart): re-implemented smart as multi-source picker
This commit is contained in:
parent
9434986ff1
commit
450d1d4d4c
1 changed files with 8 additions and 5 deletions
|
@ -559,11 +559,13 @@ M.search_history = {
|
|||
---@field finders? string[] list of finders to use
|
||||
---@field filter? snacks.picker.filter.Config
|
||||
M.smart = {
|
||||
finder = "smart",
|
||||
finders = { "buffers", "recent", "files" },
|
||||
format = "file",
|
||||
-- sort the results even when the filter is empty (frecency)
|
||||
matcher = { sort_empty = true },
|
||||
multi = { "buffers", "recent", "files" },
|
||||
format = "file", -- use `file` format for all sources
|
||||
matcher = {
|
||||
cwd_bonus = true, -- boost cwd matches
|
||||
frecency = true, -- use frecency boosting
|
||||
sort_empty = true, -- sort even when the filter is empty
|
||||
},
|
||||
win = {
|
||||
input = {
|
||||
keys = {
|
||||
|
@ -573,6 +575,7 @@ M.smart = {
|
|||
},
|
||||
list = { keys = { ["dd"] = "bufdelete" } },
|
||||
},
|
||||
transform = "unique_file",
|
||||
}
|
||||
|
||||
M.spelling = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue