From 4a7d5465d5e2635d60ccf10a64b18d67d1bb3511 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Thu, 27 Jun 2024 22:57:09 +0300 Subject: [PATCH] fix(telescope): respect `show_untracked` in user configuration --- lua/lazyvim/plugins/extras/editor/telescope.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/telescope.lua b/lua/lazyvim/plugins/extras/editor/telescope.lua index 9d40dcdf..eda92c85 100644 --- a/lua/lazyvim/plugins/extras/editor/telescope.lua +++ b/lua/lazyvim/plugins/extras/editor/telescope.lua @@ -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")