From abb03129e0b0b7f4c992b1b4c98245cd4422e7d5 Mon Sep 17 00:00:00 2001 From: shadmansaleh Date: Wed, 19 Oct 2022 09:07:21 +0000 Subject: [PATCH] chore: autogen (vimdocs+formating) --- doc/lualine.txt | 1 + lua/lualine/components/searchcount.lua | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) 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