[nvim] Maybe finally fixes snacks smart picker

This commit is contained in:
2025-05-09 18:20:44 -07:00
parent 4dc66c25f6
commit f76969136e

View File

@@ -10,7 +10,7 @@ return {
-- sort even when the search string is empty
sort_empty = true,
-- Enable frecensy for matchers. This puts more common files near the top
frecency = true,
frecency = false,
-- Make sure files in the current directory are prioritized
cwd_bonus = true,
-- Give more weight to files that are more recent
@@ -23,7 +23,24 @@ return {
{
"<leader><space>",
function()
Snacks.picker.smart()
Snacks.picker.smart({
-- Remove the "recent" picker so we don't get things from other directories.
multi = { "buffers", "files" },
matcher = {
-- sort even when the search string is empty
sort_empty = false,
-- Enable frecensy for matchers. This puts more common files near
-- the top This includes files that aren't open and can put files I
-- am done with above open files, so it's off.
frecency = false,
-- Make sure files in the current directory are prioritized
cwd_bonus = true,
-- Give more weight to files that are more recent
history_bonus = true,
-- Give more weight to places where the filename is part of the match
filename_bonus = true,
},
})
end,
desc = "Smart Find Files",
},