local gps = require("nvim-gps") local function search_count() if vim.api.nvim_get_vvar("hlsearch") == 1 then local res = vim.fn.searchcount({ maxcount = 999, timeout = 500 }) if res.total > 0 then return string.format("%d/%d", res.current, res.total) end end return "" end require("lualine").setup({ sections = { lualine_a = { "filename" }, lualine_b = { { search_count, type = "lua_expr" } }, lualine_c = { { gps.get_location, cond = gps.is_available } }, lualine_x = {}, lualine_y = { "branch" }, lualine_z = { "filetype" }, }, })