2022-12-27 18:36:38 +01:00
|
|
|
|
local M = {
|
2022-12-28 12:59:51 +01:00
|
|
|
|
"nvim-lualine/lualine.nvim",
|
|
|
|
|
dependencies = { "kyazdani42/nvim-web-devicons" },
|
|
|
|
|
event = "VeryLazy",
|
2022-12-27 18:36:38 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
local function clock()
|
2022-12-28 12:59:51 +01:00
|
|
|
|
return os.date("%H:%M")
|
2022-12-27 18:36:38 +01:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function M.config()
|
2022-12-28 12:59:51 +01:00
|
|
|
|
local lualine = require("lualine")
|
2022-12-27 18:36:38 +01:00
|
|
|
|
|
2022-12-28 12:59:51 +01:00
|
|
|
|
lualine.setup({
|
|
|
|
|
options = {
|
|
|
|
|
globalstatus = true,
|
|
|
|
|
theme = "onelight",
|
|
|
|
|
component_separators = { left = "╲", right = "╱" },
|
|
|
|
|
section_separators = { left = "", right = "" },
|
|
|
|
|
},
|
|
|
|
|
sections = {
|
|
|
|
|
lualine_c = {
|
|
|
|
|
{
|
|
|
|
|
"filename",
|
|
|
|
|
path = 1,
|
|
|
|
|
file_status = true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
function()
|
|
|
|
|
local navic = require("nvim-navic")
|
|
|
|
|
local ret = navic.get_location()
|
|
|
|
|
return ret:len() > 2000 and "navic error" or ret
|
|
|
|
|
end,
|
|
|
|
|
cond = function()
|
|
|
|
|
if package.loaded["nvim-navic"] then
|
|
|
|
|
local navic = require("nvim-navic")
|
|
|
|
|
return navic.is_available()
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
color = { fg = "#ff8f00" },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
lualine_x = { "filetype" },
|
|
|
|
|
lualine_y = { "location" },
|
|
|
|
|
lualine_z = { clock },
|
|
|
|
|
},
|
|
|
|
|
})
|
2022-12-27 18:36:38 +01:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return M
|