Skip to content

Commit

Permalink
chore(keymap.live-grep): simplify
Browse files Browse the repository at this point in the history
Signed-off-by: Jint-lzxy <[email protected]>
  • Loading branch information
Jint-lzxy committed Jan 19, 2025
1 parent a02472d commit 52ee8ad
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lua/keymap/tool.lua
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down Expand Up @@ -111,10 +111,7 @@ local plug_map = {
:with_silent()
:with_desc("tool: Find patterns"),
["v|<leader>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()
Expand Down

0 comments on commit 52ee8ad

Please sign in to comment.