From cb4ce03b35cf9f46d1df129c44685bfb4d08f3a3 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 767d5dd6..6794c489 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 4e4fbde1..25eb38f8 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 e488e894..a3a39a43 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 f99394fe..77c3eda4 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 1bd03c64..96589dd0 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 00000000..b7e35f49 --- /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 00000000..d6d67d57 --- /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 00000000..b97b9eac --- /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"; + }; +} +