diff --git a/doc/lualine.txt b/doc/lualine.txt index 8510319..8a09dba 100644 --- a/doc/lualine.txt +++ b/doc/lualine.txt @@ -250,6 +250,7 @@ CHANGING COMPONENTS IN LUALINE SECTIONS ~ - `location` (location in file in line:column format) - `mode` (vim mode) - `progress` (%progress in file) +- `searchcount` (number of search matches when hlsearch is active) - `tabs` (shows currently available tabs) - `windows` (shows currently available windows) diff --git a/lua/lualine/components/searchcount.lua b/lua/lualine/components/searchcount.lua index 1b8fe2b..839a3b8 100644 --- a/lua/lualine/components/searchcount.lua +++ b/lua/lualine/components/searchcount.lua @@ -1,11 +1,11 @@ local function searchcount() if vim.v.hlsearch == 0 then - return "" + return '' end - local result = vim.fn.searchcount({ maxcount = 999, timeout = 500 }) + local result = vim.fn.searchcount { maxcount = 999, timeout = 500 } local denominator = math.min(result.total, result.maxcount) - return string.format("[%d/%d]", result.current, denominator) + return string.format('[%d/%d]', result.current, denominator) end return searchcount