From 87bb521c99ce8ba29f82d68a8535988a6f314480 Mon Sep 17 00:00:00 2001 From: ayamir Date: Tue, 7 Jan 2025 11:48:47 +0800 Subject: [PATCH] fix: search user config when under nvim config path. --- lua/keymap/tool.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/keymap/tool.lua b/lua/keymap/tool.lua index f21bdfa5e..4a15c68e3 100644 --- a/lua/keymap/tool.lua +++ b/lua/keymap/tool.lua @@ -3,6 +3,7 @@ local map_cr = bind.map_cr local map_cu = bind.map_cu local map_cmd = bind.map_cmd local map_callback = bind.map_callback +local vim_path = require("core.global").vim_path require("keymap.helpers") local plug_map = { @@ -103,7 +104,11 @@ local plug_map = { :with_silent() :with_desc("tool: Find patterns"), ["v|fs"] = map_callback(function() - require("telescope-live-grep-args.shortcuts").grep_visual_selection() + local opts = {} + if vim.fn.getcwd() == vim_path then + opts["additional_args"] = { "--no-ignore" } + end + require("telescope-live-grep-args.shortcuts").grep_visual_selection(opts) end) :with_noremap() :with_silent()