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
563 B
Lua
Raw Normal View History

2022-03-20 04:22:56 +00:00
local gps = require("nvim-gps")
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-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-03-20 04:22:56 +00:00
lualine_c = { { gps.get_location, cond = gps.is_available } },
2022-05-04 20:47:51 +00:00
lualine_x = {},
2022-05-15 20:16:43 +00:00
lualine_y = { "branch" },
2022-05-04 20:47:51 +00:00
lualine_z = { "filetype" },
2022-03-20 04:22:56 +00:00
},
})