Closed c30ra closed 1 month ago
Hmm, the only potential cause for this I can think of is that you haven't saved your buffer to the file (:w
).
If that is not the case, could you try a reproducible config? (Save as repro.lua
and run with nvim -u repro.lua
.)
local spec = {
{
"chrisgrieser/nvim-rip-substitute",
opts = {}, -- insert config here
keys = {
{
"gs",
function() require("rip-substitute").sub() end,
mode = { "n", "x" },
desc = "rip substitute",
},
},
},
}
--------------------------------------------------------------------------------
vim.env.LAZY_STDPATH = "./nvim-repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro { spec = spec }
that's it... i tried it in a non saved buffer to see if everything is working. On saved buffers it work. Thanks for the quick reply!!
no problem! Nonetheless, this bug report was still helpful. I made a small update that ensures the buffer is being written when rip-substitute is called, so that this issue should not occur again.
It's not possible to pass directly the buffer content to rg? Maybe using echo?
if i do: echo some string | rg --column --line-number --only-matching some
it gets the results.
yeah, passing the buffer content as stdin is possible. But simply writing the buffer is a bit simpler code-wise. (And it's also better performance-wise, since this plugins calls rg
a lot, and iirc, rg
has a caching mechanism for when repeatedly reading from the same file)
Make sure you have done the following
Bug Description
When type in the popup the regex no matches are found
Relevant Screenshot
To Reproduce
ripgrep is present with pcre2 and jit
neovim version