fdschmidt93 / telescope-egrepify.nvim

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

feat: add search_dirs support #13

Closed otavioschwanck closed 11 months ago

otavioschwanck commented 11 months ago

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

fdschmidt93 commented 11 months ago

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

kdurant commented 9 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>