mirror of
https://github.com/harivansh-afk/nvim.git
synced 2026-04-16 23:02:02 +00:00
search results unlimited
This commit is contained in:
parent
d7236fcfbd
commit
a8610285c6
2 changed files with 13 additions and 1 deletions
1
init.lua
1
init.lua
|
|
@ -42,6 +42,7 @@ vim.opt.splitbelow = true
|
||||||
vim.opt.splitright = true
|
vim.opt.splitright = true
|
||||||
vim.opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
vim.opt.clipboard = "unnamedplus"
|
vim.opt.clipboard = "unnamedplus"
|
||||||
|
vim.opt.shortmess:append("S") -- Disable native search count display
|
||||||
|
|
||||||
-- Keymaps
|
-- Keymaps
|
||||||
vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "Quit" })
|
vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "Quit" })
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,18 @@ return {
|
||||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||||
lualine_c = {'filename'},
|
lualine_c = {'filename'},
|
||||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
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'}
|
lualine_z = {'location'}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue