Merge pull request #75 from NotAShelf/feature/wakatime

Feature/wakatime
This commit is contained in:
NotAShelf 2023-05-15 14:38:58 +03:00 committed by GitHub
commit 3edf981d6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 0 deletions

View file

@ -151,6 +151,7 @@ inputs: let
vim.utility = { vim.utility = {
colorizer.enable = true; colorizer.enable = true;
vim-wakatime.enable = true;
icon-picker.enable = true; icon-picker.enable = true;
diffview-nvim.enable = true; diffview-nvim.enable = true;
motion = { motion = {

View file

@ -8,5 +8,6 @@ _: {
./icon-picker ./icon-picker
./telescope ./telescope
./diffview ./diffview
./wakatime
]; ];
} }

View file

@ -0,0 +1,24 @@
{
config,
lib,
pkgs,
...
}:
with lib;
with builtins; let
cfg = config.vim.utility.vim-wakatime;
in {
config = mkIf (cfg.enable) {
vim.startPlugins = [
pkgs.vimPlugins.vim-wakatime
];
vim.configRC.vim-wakatime = nvim.dag.entryAnywhere ''
${
if cfg.cli-package == null
then ""
else ''let g:wakatime_CLIPath = "${cfg.cli-package}"''
}
'';
};
}

View file

@ -0,0 +1,6 @@
_: {
imports = [
./config.nix
./vim-wakatime.nix
];
}

View file

@ -0,0 +1,17 @@
{
lib,
pkgs,
...
}:
with lib;
with builtins; {
options.vim.utility.vim-wakatime = {
enable = mkEnableOption "Enable vim-wakatime";
cli-package = mkOption {
type = with types; nullOr package;
default = pkgs.wakatime;
description = "The package that should be used for wakatime-cli. Set as null to use the default path in `$XDG_DATA_HOME`";
};
};
}