fdschmidt93 / telescope-egrepify.nvim

Variable user customization for telescope.live_grep to set rg flags on-the-fly
MIT License
123 stars 13 forks source link

feat: add search_dirs support #13

Closed otavioschwanck closed 1 year ago

otavioschwanck commented 1 year ago

fixes https://github.com/fdschmidt93/telescope-egrepify.nvim/issues/12

fdschmidt93 commented 1 year ago

I added docs and unified style (very nit picky), LGTM otherwise, thanks :)

kdurant commented 11 months ago
utils.find_git_root = function()
    local path = vim.fn.system({ "git", "rev-parse", "--show-toplevel" })
    path = string.sub(path, 1, -2)
    if string.find(path, "fatal") then
        return nil
    else
        return path
    end
end

lua require "telescope".extensions.egrepify.egrepify({search_dirs = {require('utils').find_git_root()}})

I can't use this command to open file with <C-T>, <C-V> and <CR>