Skip to content

Commit bfb740e

Browse files
committed
chore(keymap.live-grep): simplify
1 parent 65211b3 commit bfb740e

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lua/keymap/tool.lua

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
local vim_path = require("core.global").vim_path
12
local bind = require("keymap.bind")
23
local map_cr = bind.map_cr
34
local map_cu = bind.map_cu
45
local map_cmd = bind.map_cmd
56
local map_callback = bind.map_callback
6-
local vim_path = require("core.global").vim_path
77
local et = bind.escape_termcode
88
require("keymap.helpers")
99

@@ -146,15 +146,8 @@ local mappings = {
146146
:with_noremap()
147147
:with_silent()
148148
:with_desc("tool: Find patterns"),
149-
-- ["v|<leader>fs"] = map_cu("Telescope grep_string")
150-
-- :with_noremap()
151-
-- :with_silent()
152-
-- :with_desc("tool: Find word under cursor"),
153149
["v|<leader>fs"] = map_callback(function()
154-
local opts = {}
155-
if vim.fn.getcwd() == vim_path then
156-
opts["additional_args"] = { "--no-ignore" }
157-
end
150+
local opts = vim.fn.getcwd() == vim_path and { additional_args = { "--no-ignore" } } or {}
158151
require("telescope-live-grep-args.shortcuts").grep_visual_selection(opts)
159152
end)
160153
:with_noremap()

0 commit comments

Comments
 (0)