mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-27 11:55:22 +00:00
utility/vim-wakatime: adjust dir name; track via npins & migrate to setupOpts
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate documentation builds-1 (push) Waiting to run
Treewide Checks / Validate documentation builds-2 (push) Waiting to run
Treewide Checks / Validate documentation builds-3 (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate documentation builds-1 (push) Waiting to run
Treewide Checks / Validate documentation builds-2 (push) Waiting to run
Treewide Checks / Validate documentation builds-3 (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I1a292560f7147a390ab28e97b9f1bece6a6a6964
This commit is contained in:
parent
c7c90abadb
commit
5647ee9f90
8 changed files with 68 additions and 47 deletions
19
modules/plugins/utility/vim-wakatime/config.nix
Normal file
19
modules/plugins/utility/vim-wakatime/config.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.vim.utility.vim-wakatime;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
lazy.plugins."vim-wakatime" = {
|
||||
package = "vim-wakatime";
|
||||
setupModule = "wakatime";
|
||||
inherit (cfg) setupOpts;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/plugins/utility/vim-wakatime/default.nix
Normal file
6
modules/plugins/utility/vim-wakatime/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./vim-wakatime.nix
|
||||
];
|
||||
}
|
||||
27
modules/plugins/utility/vim-wakatime/vim-wakatime.nix
Normal file
27
modules/plugins/utility/vim-wakatime/vim-wakatime.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||
inherit (lib.types) str;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.utility.vim-wakatime = {
|
||||
enable = mkEnableOption ''
|
||||
automatic time tracking and metrics generated from your programming activity [vim-wakatime]
|
||||
'';
|
||||
|
||||
setupOpts = mkPluginSetupOption "vim-wakatime" {
|
||||
cli_path = mkOption {
|
||||
type = str;
|
||||
default = lib.getExe' pkgs.wakatime-cli "wakatime-cli";
|
||||
defaultText = literalExpression "lib.getExe' pkgs.wakatime-cli \"wakatime-cli\"";
|
||||
example = literalExpression "wakatime-cli";
|
||||
description = ''
|
||||
Path to wakatime-cli executable. Set to `"wakatime-cli"` to get `wakatime-cli` from {env}`PATH`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue