feat(root): customizable root detection and :LazyRoot command

This commit is contained in:
Folke Lemaitre 2023-10-11 08:59:18 +02:00
parent 5538ab2d64
commit 171a843edf
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
6 changed files with 126 additions and 38 deletions

View file

@ -22,7 +22,7 @@ function M.telescope(builtin, opts)
return function()
builtin = params.builtin
opts = params.opts
opts = vim.tbl_deep_extend("force", { cwd = Util.root.get() }, opts or {}) --[[@as lazyvim.util.telescope.opts]]
opts = vim.tbl_deep_extend("force", { cwd = Util.root() }, opts or {}) --[[@as lazyvim.util.telescope.opts]]
if builtin == "files" then
if vim.loop.fs_stat((opts.cwd or vim.loop.cwd()) .. "/.git") then
opts.show_untracked = true