diff --git a/lua/snacks/picker/config/sources.lua b/lua/snacks/picker/config/sources.lua index 29deef16..37164fc0 100644 --- a/lua/snacks/picker/config/sources.lua +++ b/lua/snacks/picker/config/sources.lua @@ -283,6 +283,7 @@ M.git_log = { format = "git_log", preview = "git_show", confirm = "git_checkout", + supports_live = true, sort = { fields = { "score:desc", "idx" } }, } diff --git a/lua/snacks/picker/source/git.lua b/lua/snacks/picker/source/git.lua index a4a9e4ae..42e8bb57 100644 --- a/lua/snacks/picker/source/git.lua +++ b/lua/snacks/picker/source/git.lua @@ -139,6 +139,10 @@ function M.log(opts, ctx) args[#args + 1] = file end + if ctx.filter.search ~= "" then + vim.list_extend(args, { "-S", ctx.filter.search }) + end + local Proc = require("snacks.picker.source.proc") file = file and svim.fs.normalize(file) or nil