Closed arthur19q3 closed 3 months ago
@arthur19q3 its paths
not path
prefills = {
filesFilter = "*.rs",
paths = "/home/user/project"
}
@choovick is correct! Always make sure to double-check the options here: https://github.com/MagicDuck/grug-far.nvim/blob/16091184639ca7f2c76734e3a8641d388aebc4e7/lua/grug-far/opts.lua#L155 Also recommend you install https://github.com/folke/lazydev.nvim, that way you get auto-complete:
okk, that was a typo. just have fixed it. thx.
Bug Report
Description
When invoking the
grug-far
plugin with the<leader>sr
keybinding, thepath
parameter is not being automatically filled with the project root. Despite passing the correctpath
to thegrug_far
function, the plugin does not seem to recognize or utilize the provided path.Environment
NVIM v0.10
Steps to Reproduce
Install and configure
grug-far
plugin as described in the README.Add the following keybinding to
grug-far.lua
:Open Neovim in a project with a Git repository.
Trigger the keybinding
<leader>sr
.Observe that the
path
parameter is not correctly set to the project root.Expected Behavior
The
grug-far
plugin should automatically use the providedpath
parameter as the root for search and replace operations.Actual Behavior
The
path
parameter does not seem to be utilized, resulting in the plugin not searching in the intended project root directory.Debug Information
The following debug messages confirm that the
path
parameter is correctly calculated and passed to thegrug_far
function:The project root is correctly determined using
git rev-parse --show-toplevel
and falls back tovim.fn.getcwd()
if necessary.