dotfiles/.config/nvim/lua/plugins/lualine.lua

53 lines
1 KiB
Lua
Raw Normal View History

2022-12-27 18:36:38 +01:00
local M = {
"nvim-lualine/lualine.nvim",
dependencies = { "kyazdani42/nvim-web-devicons" },
event = "VeryLazy",
2022-12-27 18:36:38 +01:00
}
local function clock()
return os.date("%H:%M")
2022-12-27 18:36:38 +01:00
end
function M.config()
local lualine = require("lualine")
2022-12-27 18:36:38 +01:00
lualine.setup({
options = {
globalstatus = true,
2023-03-08 12:58:51 +01:00
theme = "onedark",
2023-05-07 10:43:13 +02:00
-- theme = "wombat",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
},
sections = {
2023-05-07 10:43:13 +02:00
lualine_a = { "hostname" },
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