fix(telescope): respect show_untracked in user configuration

This commit is contained in:
Iordanis Petkakis 2024-06-27 22:57:09 +03:00
parent ff1b44e676
commit 4a7d5465d5

View file

@ -21,6 +21,10 @@ local picker = {
open = function(builtin, opts)
opts = opts or {}
opts.follow = opts.follow ~= false
local tele_opts = LazyVim.opts("telescope.nvim")
if tele_opts.pickers and tele_opts.pickers.git_files then
opts.show_untracked = tele_opts.pickers.git_files.show_untracked ~= false
end
if opts.cwd and opts.cwd ~= vim.uv.cwd() then
local function open_cwd_dir()
local action_state = require("telescope.actions.state")