epwalsh / pomo.nvim

:new: :stopwatch: A simple, customizable pomodoro timer for Neovim, written in Lua, with nvim-notify, lualine, and telescope integrations
Apache License 2.0
186 stars 10 forks source link

[FEAT] Pomodoro Technique #27

Closed Yushi5058 closed 2 months ago

Yushi5058 commented 3 months ago

๐Ÿš€ The feature, motivation and pitch

Hello, I saw this plugin and I really would like to use it for my workflow as the pomodoro technique helps me lessen the distractions I have when wanting to work. One thing I don't really like is how the command is output. Why not make a single command when you specify the time for work / focus, the time for the short break, and the time for the long break for example : TimerStart

Also, I have a much better implementation idea where you can make some options in the default configuration to define the time of focus, the short and long break and how many pomos for the long break then the user will just have to call the command with the name of the pomo session instead of passing so many arguments. The timers will be configurable by changing it in the opts table for example.

Hope I'm a little bit clear. Thanks for the awesome work and keep up ! I would love to add some complementary information if you need to

Best regards, Yushi

Alternatives

No response

Additional context

No response

epwalsh commented 3 months ago

Hey @Yushi5058 I'd be happy to review a PR for this

jmartinn commented 2 months ago

Hi @epwalsh,

I have implemented the feature and opened a pull request for it: PR #29 .

This PR adds a new :TimerSession <session_name> command to manage Pomodoro like sessions based on predefined configurations.

Looking forward to your feedback ๐Ÿ˜!

jmartinn commented 2 months ago

Hi @epwalsh,

I was configuring custom sessions for the new version of the plugin and noticed I forgot to update the Installation section of the README when I submitted my pull request. Specifically, I neglected to add the TimerSession command to the cmd option for installing the plugin via lazy.nvim.

Hereโ€™s the current version of the code snippet in the README:

return {
  "epwalsh/pomo.nvim",
  version = "*",  -- Recommended, use latest release instead of latest commit
  lazy = true,
  cmd = { "TimerStart", "TimerRepeat" },
  dependencies = {
    -- Optional, but highly recommended if you want to use the "Default" timer
    "rcarriga/nvim-notify",
  },
  opts = {
    -- See below for full list of options ๐Ÿ‘‡
  },
}

And hereโ€™s the corrected version:

return {
  "epwalsh/pomo.nvim",
  version = "*",  -- Recommended, use latest release instead of latest commit
  lazy = true,
  cmd = { "TimerStart", "TimerRepeat", "TimerSession" },
  dependencies = {
    -- Optional, but highly recommended if you want to use the "Default" timer
    "rcarriga/nvim-notify",
  },
  opts = {
    -- See below for full list of options ๐Ÿ‘‡
  },
}

I thought it would be kind of cumbersome to create a whole new branch and submit a new pull request just for this small change.

Thank you for your understanding and sorry for the oversight!

epwalsh commented 2 months ago

Thanks @jmartinn, fixed here: baae869