Closed ilias777 closed 2 months ago
Can you try this custom provider and see if it resolves your issue? I ran into something similar and fixed it in my personal config:
provider = function()
if vim.v.hlsearch == 0 then return '' end
local ok, result =
pcall(vim.fn.searchcount, { maxcount = 999, timeout = 250 })
if not ok then return '' end
if next(result) == nil then return '' end
local denominator = math.min(result.total, result.maxcount)
return string.format('[%d/%d]', result.current, denominator)
end,
If this works for you, I think I can patch the built-in provider so that the issue is fixed.
Yes! This works. Error doesn't exist with this function.
You can patch this 😊👍🏻
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.11.0-dev-219+gc37695a5d-Homebrew
Operating system/version
MacOS 14.5
Describe the bug
I use the
search_count
provider in feline. If I want to use a capturing group for search and replace, the error messageVim:E54: Unmatched \(
appears.In my example below I want to insert a description to my keymaps at once. So I startet the Visual Mode, select the region and press
:s/
to start search and replace. I want to capture the whole text until)
.So I type:
)
and here are the error.It works, but the error message exist every time I tried to do something similar.
https://github.com/user-attachments/assets/bdf369c3-1aa8-49ab-b984-410ca4740498
Steps To Reproduce
:
s/\(
to start the capturing group. The error appearsOr without selecting a region in Visual Mode:
:%s/\(
The error appears here toExpected Behavior
No error by starting a capturing group.
Repro