Skip to content

Freed-Wu/code-stats.nvim

Repository files navigation

code-stats.nvim

pre-commit.ci status github/workflow

github/downloads github/downloads/latest github/issues github/issues-closed github/issues-pr github/issues-pr-closed github/discussions github/milestones github/forks github/stars github/watchers github/contributors github/commit-activity github/last-commit github/release-date

github/license github/languages github/languages/top github/directory-file-count github/code-size github/repo-size github/v

luarocks

Code::Stats plugin for Neovim.

Install

rocks.nvim

Command style

:Rocks install code-stats.nvim

Declare style

~/.config/nvim/rocks.toml:

[plugins]
"code-stats.nvim" = "scm"

Then

:Rocks sync

or:

$ luarocks --lua-version 5.1 --local --tree ~/.local/share/nvim/rocks install code-stats.nvim
# ~/.local/share/nvim/rocks is the default rocks tree path
# you can change it according to your vim.g.rocks_nvim.rocks_path

Configure

require"code-stats".setup({
    args = {
        headers = {
            ['X-API-Token'] = "XXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        }
    }
})

For compatibility for code-stats-zsh and code-stats-bash, the following is also OK:

require"code-stats".setup({
    dotenv = "/the/path/of/codestats.sh"
})

/the/path/of/codestats.sh:

CODESTATS_API_KEY=XXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related Projects