mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(picker.git): default to git root for git_files
. Closes #751
This commit is contained in:
parent
c875fefa82
commit
3cdebee880
1 changed files with 4 additions and 0 deletions
|
@ -21,6 +21,10 @@ function M.files(opts, ctx)
|
|||
elseif opts.submodules then
|
||||
table.insert(args, "--recurse-submodules")
|
||||
end
|
||||
if not opts.cwd then
|
||||
opts.cwd = Snacks.git.get_root()
|
||||
ctx.picker:set_cwd(opts.cwd)
|
||||
end
|
||||
local cwd = vim.fs.normalize(opts and opts.cwd or uv.cwd() or ".") or nil
|
||||
return require("snacks.picker.source.proc").proc({
|
||||
opts,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue