search results unlimited

This commit is contained in:
Harivansh Rathi 2025-10-23 16:38:36 -04:00
parent d7236fcfbd
commit a8610285c6
2 changed files with 13 additions and 1 deletions

View file

@ -42,6 +42,7 @@ vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.cursorline = true
vim.opt.clipboard = "unnamedplus"
vim.opt.shortmess:append("S") -- Disable native search count display
-- Keymaps
vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "Quit" })

View file

@ -13,7 +13,18 @@ return {
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_y = {
{
function()
local search = vim.fn.getreg('/')
if search == '' then return '' end
local ok, result = pcall(vim.fn.searchcount, { maxcount = 0, timeout = 100 })
if not ok or not result or result.total == 0 then return '' end
return string.format('[%d/%d]', result.current, result.total)
end,
},
'progress'
},
lualine_z = {'location'}
},
}