A simple Neovim plugin for displaying the current clock time in your lualine.
This plugin was created because I often keep my terminal in fullscreen mode and, as a Windows user, I can't see the clock. It's particularly helpful when coding late at night.
( TIP: This is also my first Neovim plugin project after transitioning from VSCode, which I highly recommend to anyone looking for a game-changing editor experience. )
To add the time to your lualine setup, simply include it in your lualine sections. Here's an example configuration:
return {
"nvim-lualine/lualine.nvim",
dependencies = {
"nvim-tree/nvim-web-devicons",
"justinhj/battery.nvim",
"iamvladw/lualine-time.nvim",
},
config = function()
require("lualine").setup({
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
always_show_tabline = true,
globalstatus = true,
refresh = {
statusline = 100,
tabline = 100,
winbar = 100,
},
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch", "diff", "diagnostics", "filename" },
lualine_c = {},
lualine_x = {},
lualine_y = { "encoding", "fileformat", "filetype", nvimbattery },
lualine_z = { "location", "time" },
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {},
})
end,
}
This project is licensed under the MIT License.