1
0
Fork 0
mirror of https://codeberg.org/Mo8it/dotfiles.git synced 2024-10-17 20:52:40 +00:00
dotfiles/.config/nvim/lua/plugins/lualine.lua

25 lines
561 B
Lua
Raw Normal View History

2022-06-30 02:27:06 +00:00
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
2022-08-15 18:12:36 +00:00
local navic = require("nvim-navic")
2022-03-20 04:22:56 +00:00
require("lualine").setup({
sections = {
lualine_a = { "filename" },
2022-06-30 02:27:06 +00:00
lualine_b = { { search_count, type = "lua_expr" } },
2022-08-15 18:12:36 +00:00
lualine_c = { { navic.get_location, cond = navic.is_available } },
2022-05-04 20:47:51 +00:00
lualine_x = {},
2022-09-11 17:33:29 +00:00
lualine_y = {},
2022-05-04 20:47:51 +00:00
lualine_z = { "filetype" },
2022-03-20 04:22:56 +00:00
},
})