mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-23 05:40:44 +00:00
Merge pull request #75 from NotAShelf/feature/wakatime
Feature/wakatime
This commit is contained in:
commit
3edf981d6b
5 changed files with 49 additions and 0 deletions
|
@ -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 = {
|
||||||
|
|
|
@ -8,5 +8,6 @@ _: {
|
||||||
./icon-picker
|
./icon-picker
|
||||||
./telescope
|
./telescope
|
||||||
./diffview
|
./diffview
|
||||||
|
./wakatime
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
24
modules/utility/wakatime/config.nix
Normal file
24
modules/utility/wakatime/config.nix
Normal 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}"''
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
6
modules/utility/wakatime/default.nix
Normal file
6
modules/utility/wakatime/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
_: {
|
||||||
|
imports = [
|
||||||
|
./config.nix
|
||||||
|
./vim-wakatime.nix
|
||||||
|
];
|
||||||
|
}
|
17
modules/utility/wakatime/vim-wakatime.nix
Normal file
17
modules/utility/wakatime/vim-wakatime.nix
Normal 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`";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue