Summary: When using this backend in a directory that is not a git repository, it will search though all the file. This is mostly a problem when using an alternative source control like sapling. When using this backend neovim will just hang until the rg command is done. When searching node_modules you can imagine how long that takes. This does not actually fix the issue however, it does make it search though less files. Test Plan: This has been used manually on a sapling repo. I have also added `--no-require-git` to most of the rg defaults in other applications.
12 lines
305 B
Lua
12 lines
305 B
Lua
local utils = require "ivy.utils"
|
|
|
|
local rg = {
|
|
name = "RG",
|
|
command = "IvyRg",
|
|
description = "Run ripgrep to search for content in files",
|
|
keymap = "<leader>/",
|
|
items = utils.command_finder "rg --no-require-git --max-columns 200 --vimgrep --",
|
|
callback = utils.vimgrep_action(),
|
|
}
|
|
|
|
return rg
|