fix grep and file explorer rel to file

This commit is contained in:
Barak Michener 2021-10-28 14:14:41 -07:00
parent aa7a192b0c
commit ac8cca19b1
2 changed files with 11 additions and 3 deletions

View file

@ -168,9 +168,16 @@ local dropdown = require'telescope.themes'.get_dropdown({
--winblend = 10
})
git_grep_word = function(conf)
git_live_grep = function(conf)
local opt = dropdown
opt.cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
for k,v in pairs(conf) do opt[k] = v end
builtin.live_grep(opt)
end
git_grep_word = function(conf)
local opt = dropdown
opt.cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
for k,v in pairs(conf) do opt[k] = v end
builtin.grep_string(opt)
end