mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-01 21:14:38 +02:00
fix(telescope): dont use git_files when .ignore or .rgignore file is present
This commit is contained in:
parent
66bf7525e3
commit
e7a58d9484
1 changed files with 5 additions and 1 deletions
|
@ -24,7 +24,11 @@ function M.telescope(builtin, opts)
|
||||||
opts = params.opts
|
opts = params.opts
|
||||||
opts = vim.tbl_deep_extend("force", { cwd = Util.root() }, 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 builtin == "files" then
|
||||||
if vim.loop.fs_stat((opts.cwd or vim.loop.cwd()) .. "/.git") then
|
if
|
||||||
|
vim.loop.fs_stat((opts.cwd or vim.loop.cwd()) .. "/.git")
|
||||||
|
and not vim.loop.fs_stat((opts.cwd or vim.loop.cwd()) .. "/.ignore")
|
||||||
|
and not vim.loop.fs_stat((opts.cwd or vim.loop.cwd()) .. "/.rgignore")
|
||||||
|
then
|
||||||
opts.show_untracked = true
|
opts.show_untracked = true
|
||||||
builtin = "git_files"
|
builtin = "git_files"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue