feat(nvim): added pomo extra

pomodoro plugin
This commit is contained in:
Sergio Laín 2023-12-01 11:29:39 +01:00
parent b1e9679621
commit 3a92a180cb
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
2 changed files with 40 additions and 2 deletions

View file

@ -73,4 +73,3 @@
},
"version": 2
}

View file

@ -0,0 +1,39 @@
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,
},
}