Skip to content

Commit

Permalink
fix: search user config when cwd is nvim config path.
Browse files Browse the repository at this point in the history
  • Loading branch information
ayamir committed Jan 4, 2025
1 parent c7ed79d commit 161153e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/modules/configs/tool/search.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
return function()
local builtin = require("telescope.builtin")
local extensions = require("telescope").extensions
local vim_path = require("core.global").vim_path

require("modules.utils").load_plugin("search", {
collections = {
Expand All @@ -12,7 +13,9 @@ return function()
name = "Files",
tele_func = function(opts)
opts = opts or {}
if vim.fn.isdirectory(".git") == 1 then
if vim.fn.getcwd() == vim_path then
builtin.find_files(vim.tbl_deep_extend("force", opts, { no_ignore = true }))
elseif vim.fn.isdirectory(".git") == 1 then
builtin.git_files(opts)
else
builtin.find_files(opts)
Expand Down

0 comments on commit 161153e

Please # to comment.