From 52ee8adc42d70ab9130418086f1c74c2ecbdadc2 Mon Sep 17 00:00:00 2001 From: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> Date: Sat, 18 Jan 2025 16:34:58 -0800 Subject: [PATCH 1/2] chore(keymap.live-grep): simplify Signed-off-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com> --- lua/keymap/tool.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lua/keymap/tool.lua b/lua/keymap/tool.lua index 471e9b1a4..8dcd8ae89 100644 --- a/lua/keymap/tool.lua +++ b/lua/keymap/tool.lua @@ -1,9 +1,9 @@ +local vim_path = require("core.global").vim_path local bind = require("keymap.bind") 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 = { @@ -111,10 +111,7 @@ local plug_map = { :with_silent() :with_desc("tool: Find patterns"), ["v|fs"] = map_callback(function() - local opts = {} - if vim.fn.getcwd() == vim_path then - opts["additional_args"] = { "--no-ignore" } - end + local opts = vim.fn.getcwd() == vim_path and { additional_args = { "--no-ignore" } } or {} require("telescope-live-grep-args.shortcuts").grep_visual_selection(opts) end) :with_noremap() From 5cb54d3811f8aa6d2f16ce16671dee01677060f8 Mon Sep 17 00:00:00 2001 From: ayamir Date: Sun, 19 Jan 2025 23:37:08 +0800 Subject: [PATCH 2/2] style: add comment for telescope. Signed-off-by: ayamir --- lua/keymap/tool.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/keymap/tool.lua b/lua/keymap/tool.lua index 8cf099328..44ccf2935 100644 --- a/lua/keymap/tool.lua +++ b/lua/keymap/tool.lua @@ -98,6 +98,7 @@ local mappings = { :with_silent() :with_desc("lsp: Show document diagnostics"), + -- Plugin: telescope ["n|"] = map_callback(function() _command_panel() end)