diff --git a/extra.nix b/extra.nix index 767d5dd..6794c48 100644 --- a/extra.nix +++ b/extra.nix @@ -151,6 +151,7 @@ inputs: let vim.utility = { colorizer.enable = true; + vim-wakatime.enable = true; icon-picker.enable = true; diffview-nvim.enable = true; motion = { diff --git a/flake.lock b/flake.lock index 4e4fbde..25eb38f 100644 --- a/flake.lock +++ b/flake.lock @@ -1359,6 +1359,7 @@ "vim-repeat": "vim-repeat", "vim-startify": "vim-startify", "vim-vsnip": "vim-vsnip", + "vim-wakatime": "vim-wakatime", "which-key": "which-key", "zig": "zig" } @@ -1732,6 +1733,22 @@ "type": "github" } }, + "vim-wakatime": { + "flake": false, + "locked": { + "lastModified": 1683640992, + "narHash": "sha256-DIj+ps5XfpFHwBJ42EBw5ayHfdzCc+bDvpyYm/p+9Ec=", + "owner": "wakatime", + "repo": "vim-wakatime", + "rev": "02be9238319937e04afea73fd0fc7da5413ee041", + "type": "github" + }, + "original": { + "owner": "wakatime", + "repo": "vim-wakatime", + "type": "github" + } + }, "vowel-src": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index e488e89..a3a39a4 100644 --- a/flake.nix +++ b/flake.nix @@ -373,6 +373,11 @@ }; # Utilities + vim-wakatime = { + url = "github:wakatime/vim-wakatime"; + flake = false; + }; + colorizer = { url = "github:uga-rosa/ccc.nvim"; flake = false; diff --git a/lib/types/plugins.nix b/lib/types/plugins.nix index f99394f..77c3eda 100644 --- a/lib/types/plugins.nix +++ b/lib/types/plugins.nix @@ -81,6 +81,7 @@ with lib; let "project-nvim" "elixir-ls" "elixir-tools" + "vim-wakatime" ]; # You can either use the name of the plugin or a package. pluginsType = with types; diff --git a/modules/utility/default.nix b/modules/utility/default.nix index 1bd03c6..96589dd 100644 --- a/modules/utility/default.nix +++ b/modules/utility/default.nix @@ -8,5 +8,6 @@ _: { ./icon-picker ./telescope ./diffview + ./wakatime ]; } diff --git a/modules/utility/wakatime/config.nix b/modules/utility/wakatime/config.nix new file mode 100644 index 0000000..b7e35f4 --- /dev/null +++ b/modules/utility/wakatime/config.nix @@ -0,0 +1,15 @@ +{ + config, + lib, + ... +}: +with lib; +with builtins; let + cfg = config.vim.utility.vim-wakatime; +in { + config = mkIf (cfg.enable) { + vim.startPlugins = [ + "vim-wakatime" + ]; + }; +} diff --git a/modules/utility/wakatime/default.nix b/modules/utility/wakatime/default.nix new file mode 100644 index 0000000..d6d67d5 --- /dev/null +++ b/modules/utility/wakatime/default.nix @@ -0,0 +1,6 @@ +_: { + imports = [ + ./config.nix + ./vim-wakatime.nix + ]; +} diff --git a/modules/utility/wakatime/vim-wakatime.nix b/modules/utility/wakatime/vim-wakatime.nix new file mode 100644 index 0000000..b97b9ea --- /dev/null +++ b/modules/utility/wakatime/vim-wakatime.nix @@ -0,0 +1,8 @@ +{lib, ...}: +with lib; +with builtins; { + options.vim.utility.vim-wakatime = { + enable = mkEnableOption "Enable vim-wakatime"; + }; +} +