Skip to content

lowitea/aw-watcher.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⌛ ActivityWatch NeoVim Watcher

ActivityWatch

A neovim watcher for ActivityWatch time tracker. Fully configurable and written entirely in lua. Compatible with modern package managers.

✨ Tracks

  • 🪵 Selected git branch
  • 📝 Edited files
  • 💻 Programming language of a file
  • 💼 Your projects

🔥 Status

The project is ready to be used and actively maintained.

⚡️ Requirements

  • Neovim >= 0.9.0
  • curl

📦 Installation

Install the plugin with your preferred package manager.

Example for lazy.nvim

-- lazy.nvim
{
    "lowitea/aw-watcher.nvim",
    opts = {  -- required, but can be empty table: {}
        -- add any options here
        -- for example:
        aw_server = {
            host = "127.0.0.1",
            port = 5600,
        },
    },
}

Example for packer.nvim

-- packer_init.lua
    use { "lowitea/aw-watcher.nvim",
      config = function()
        require("aw_watcher").setup({
            -- required, but can be empty table: {}
            -- add any options here
            -- for example:
            aw_server = {
                host = "127.0.0.1",
                port = 5600,
            },
        })
      end,
    }

Example for vim-plug

For `init.lua``

Plug('lowitea/aw-watcher.nvim', { ['do'] = function()
    -- Calling the setup function is required.
    -- Bug you can pass into empty table `{}`.
    require("aw_watcher").setup({
        aw_server = {
            host = "127.0.0.1",
            port = 5600,
        },
    })
end })

Or if you are using inti.vim

Plug 'lowitea/aw-watcher.nvim'
autocmd VimEnter * lua require("aw_watcher").setup({})

⚙️ Configuration

aw-watcher.nvim comes with the following defaults:

{
    bucket = {
        hostname = nil, -- by default hostname of computer
        name = nil, -- by default "aw-watcher-neovim_" .. bucket.hostname
    },
    aw_server = {
        host = "127.0.0.1",
        port = 5600,
        ssl_enable = false,
        pulsetime = 30,
    },
}

📖 Analogues