From aef6af206b95d87c2917d2e3cc5c0ec891f40e6c Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Wed, 10 May 2023 14:41:17 +0300 Subject: [PATCH] feat: vim-wakatime --- extra.nix | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ lib/types/plugins.nix | 1 + modules/utility/default.nix | 1 + modules/utility/wakatime/config.nix | 15 +++++++++++++++ modules/utility/wakatime/default.nix | 6 ++++++ modules/utility/wakatime/vim-wakatime.nix | 8 ++++++++ 8 files changed, 54 insertions(+) create mode 100644 modules/utility/wakatime/config.nix create mode 100644 modules/utility/wakatime/default.nix create mode 100644 modules/utility/wakatime/vim-wakatime.nix diff --git a/extra.nix b/extra.nix index 08fe70b..e0c09d9 100644 --- a/extra.nix +++ b/extra.nix @@ -158,6 +158,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 9246363..89f8dac 100644 --- a/flake.lock +++ b/flake.lock @@ -1393,6 +1393,7 @@ "vim-repeat": "vim-repeat", "vim-startify": "vim-startify", "vim-vsnip": "vim-vsnip", + "vim-wakatime": "vim-wakatime", "which-key": "which-key", "zig": "zig" } @@ -1766,6 +1767,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 acc3393..a954e7e 100644 --- a/flake.nix +++ b/flake.nix @@ -384,6 +384,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 38b571b..9a2fe8d 100644 --- a/lib/types/plugins.nix +++ b/lib/types/plugins.nix @@ -83,6 +83,7 @@ with lib; let "elixir-tools" "nvim-dap" "nvim-dap-ui" + "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"; + }; +} +