feat: set up pomo.nvim

This commit is contained in:
Youwen Wu 2024-12-29 16:29:02 -08:00
parent d19465f667
commit 6ee962bb97
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
4 changed files with 87 additions and 2 deletions

View file

@ -47,11 +47,28 @@
"type": "github" "type": "github"
} }
}, },
"plugins-pomo-nvim": {
"flake": false,
"locked": {
"lastModified": 1722376269,
"narHash": "sha256-tJ2TrypKnCnQm+6FDjX0KDr+UNoBBVvGIm+uWJtpNLc=",
"owner": "epwalsh",
"repo": "pomo.nvim",
"rev": "aa8decc421d89be0f10b1fc6a602cdd269f350ff",
"type": "github"
},
"original": {
"owner": "epwalsh",
"repo": "pomo.nvim",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"nixCats": "nixCats", "nixCats": "nixCats",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"plugins-blink-ripgrep": "plugins-blink-ripgrep" "plugins-blink-ripgrep": "plugins-blink-ripgrep",
"plugins-pomo-nvim": "plugins-pomo-nvim"
} }
} }
}, },

View file

@ -9,6 +9,11 @@
url = "github:mikavilpas/blink-ripgrep.nvim"; url = "github:mikavilpas/blink-ripgrep.nvim";
flake = false; flake = false;
}; };
plugins-pomo-nvim = {
url = "github:epwalsh/pomo.nvim";
flake = false;
};
}; };
outputs = outputs =
{ {
@ -81,6 +86,8 @@
black black
stylua stylua
marksman marksman
libnotify
]; ];
}; };
@ -130,6 +137,7 @@
optionalPlugins = { optionalPlugins = {
gitPlugins = with pkgs.neovimPlugins; [ gitPlugins = with pkgs.neovimPlugins; [
blink-ripgrep blink-ripgrep
pomo-nvim
]; ];
general = with pkgs.vimPlugins; [ general = with pkgs.vimPlugins; [
nvim-autopairs nvim-autopairs

View file

@ -32,7 +32,23 @@ return {
return require("lsp-progress").progress() return require("lsp-progress").progress()
end, end,
}, },
lualine_x = { "encoding", "fileformat" }, lualine_x = {
function()
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,
"encoding",
"fileformat",
},
lualine_y = { "diff", "diagnostics" }, lualine_y = { "diff", "diagnostics" },
lualine_z = { "location" }, lualine_z = { "location" },
}, },

View file

@ -217,6 +217,7 @@ return {
lz.trigger_load("telescope.nvim") lz.trigger_load("telescope.nvim")
lz.trigger_load("nvim-lspconfig") lz.trigger_load("nvim-lspconfig")
---@diagnostic disable-next-line: missing-fields
require("tailwind-tools").setup({ require("tailwind-tools").setup({
conceal = { enabled = true }, conceal = { enabled = true },
document_color = { enabled = true }, document_color = { enabled = true },
@ -240,4 +241,47 @@ return {
"oxocarbon.nvim", "oxocarbon.nvim",
colorscheme = { "oxocarbon" }, colorscheme = { "oxocarbon" },
}, },
{
"pomo-nvim",
cmd = { "TimerStart", "TimerRepeat", "TimerSession" },
after = function()
---@diagnostic disable-next-line: missing-fields
require("pomo").setup({
notifiers = {
{
name = "Default",
opts = {
sticky = false,
},
},
{ name = "System" },
},
sessions = {
pomodoro = {
{ name = "Work", duration = "25m" },
{ name = "Short Break", duration = "5m" },
{ name = "Work", duration = "25m" },
{ name = "Short Break", duration = "5m" },
{ name = "Work", duration = "25m" },
{ name = "Long Break", duration = "15m" },
},
grind = {
{ name = "Work", duration = "45m" },
{ name = "Short Break", duration = "5m" },
{ name = "Work", duration = "45m" },
},
},
})
end,
keys = {
{
"<leader>fp",
function()
require("telescope").load_extension("pomodori")
require("telescope").extensions.pomodori.timers()
end,
desc = "Manage Pomodori Timers",
},
},
},
} }