dotfiles/.config/nvim/lua/plugins/extras/util/pomo.lua
Sergio Laín 3a92a180cb
feat(nvim): added pomo extra
pomodoro plugin
2023-12-01 11:29:39 +01:00

39 lines
777 B
Lua

return {
{
"epwalsh/pomo.nvim",
cmd = { "TimerStart", "TimerStop", "TimerRepeat" },
dependencies = {
"rcarriga/nvim-notify",
},
opts = {
notifiers = {
{
name = "Default",
opts = {
sticky = false,
},
},
},
},
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
local function pomoTimer()
local ok, pomo = pcall(require, "pomo")
if not ok then
return ""
end
local timer = pomo.get_first_to_finish()
if timer == nil then
return ""
end
return "󰄉 " .. tostring(timer)
end
table.insert(opts.sections.lualine_x, { pomoTimer })
end,
},
}