feat(git): support detached working trees (#2597)

* feat(git): support detached working trees

closes #2595

* [docgen] Update doc/telescope.txt
skip-checks: true

* fix: use_file_path

---------

Co-authored-by: Github Actions <actions@github>
This commit is contained in:
James Trew
2023-07-14 13:12:03 -04:00
committed by GitHub
parent 276362a802
commit 2ea8dcd17b
5 changed files with 124 additions and 38 deletions

View File

@@ -772,6 +772,25 @@ append(
]]
)
append(
"git_worktrees",
nil,
[[
A table of arrays of detached working trees with keys `gitdir` and `toplevel`.
Used to pass `--git-dir` and `--work-tree` flags to git commands when telescope fails
to infer the top-level directory of a given working tree based on cwd.
Example:
git_worktrees = {
{
toplevel = vim.env.HOME,
gitdir = vim.env.HOME .. '/.cfg'
}
}
Default: nil
]]
)
append(
"file_previewer",
function(...)