Skip to content

Repository files navigation

playtime.nvim

Prints the playtime of neovim.

Features

  • :SessionPlayTime prints the time you've been in the current session.
  • :PlayTime prints the total time you've been in neovim (from when you got this plugin).

Install

  • vim.pack
vim.pack.add({ "https://github.com/dee9c-git/playtime.nvim" })
require("playtime").setup({})

Default Config

require("playtime").setup({
    session_msg = "Session: %s",
    total_msg = "Play Time: %s",
    session_formatter = function(total_seconds)
        local minutes = math.floor(total_seconds / 60)
        return string.format("%d minutes", minutes)
    end,
    total_formatter = function(total_seconds)
        local hours = total_seconds / 3600
        return string.format("%.1f hours", hours)
    end,
})

Contributing

Open an issue if you have some suggestions!

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages