From ea90d2baf381b30f8ea4116438f2c04f61b5cc3b Mon Sep 17 00:00:00 2001 From: haskex Date: Mon, 28 Apr 2025 12:16:53 -0300 Subject: [PATCH 1/5] Added HardTime.nvim plugin and added vim.binds.hardtime.enable and .setupOpts options --- configuration.nix | 3 +++ modules/plugins/utility/binds/default.nix | 1 + .../plugins/utility/binds/hardtime/config.nix | 21 +++++++++++++++++++ .../utility/binds/hardtime/default.nix | 6 ++++++ .../utility/binds/hardtime/hardtime.nix | 10 +++++++++ npins/sources.json | 13 ++++++++++++ 6 files changed, 54 insertions(+) create mode 100644 modules/plugins/utility/binds/hardtime/config.nix create mode 100644 modules/plugins/utility/binds/hardtime/default.nix create mode 100644 modules/plugins/utility/binds/hardtime/hardtime.nix diff --git a/configuration.nix b/configuration.nix index 011d6fae..f48af0b4 100644 --- a/configuration.nix +++ b/configuration.nix @@ -142,6 +142,9 @@ isMaximal: { binds = { whichKey.enable = true; cheatsheet.enable = true; + + # Remove this after test + hardtime.enable = true; }; telescope.enable = true; diff --git a/modules/plugins/utility/binds/default.nix b/modules/plugins/utility/binds/default.nix index 229423b8..43666cc9 100644 --- a/modules/plugins/utility/binds/default.nix +++ b/modules/plugins/utility/binds/default.nix @@ -2,5 +2,6 @@ _: { imports = [ ./which-key ./cheatsheet + ./hardtime ]; } diff --git a/modules/plugins/utility/binds/hardtime/config.nix b/modules/plugins/utility/binds/hardtime/config.nix new file mode 100644 index 00000000..7f2cde73 --- /dev/null +++ b/modules/plugins/utility/binds/hardtime/config.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.lua) toLuaObject; + inherit (lib.nvim.dag) entryAnywhere; + + cfg = config.vim.binds.hardtime; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["hardtime-nvim"]; + + pluginRC.hardtime = entryAnywhere '' + require("hardtime").setup (${toLuaObject cfg.setupOpts}) + ''; + }; + }; +} diff --git a/modules/plugins/utility/binds/hardtime/default.nix b/modules/plugins/utility/binds/hardtime/default.nix new file mode 100644 index 00000000..89aa11d3 --- /dev/null +++ b/modules/plugins/utility/binds/hardtime/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./hardtime.nix + ./config.nix + ]; +} diff --git a/modules/plugins/utility/binds/hardtime/hardtime.nix b/modules/plugins/utility/binds/hardtime/hardtime.nix new file mode 100644 index 00000000..c27c1c0d --- /dev/null +++ b/modules/plugins/utility/binds/hardtime/hardtime.nix @@ -0,0 +1,10 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.binds.hardtime = { + enable = mkEnableOption "enable hardtime"; + + setupOpts = mkPluginSetupOption "hardtime-nvim" {}; + }; +} diff --git a/npins/sources.json b/npins/sources.json index 90a54057..5fe087f5 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -614,6 +614,19 @@ "url": "https://github.com/ellisonleao/gruvbox.nvim/archive/a933d8666dad9363dc6908ae72cfc832299c2f59.tar.gz", "hash": "02r2h0ip2vzmgmv9b36ff2r6br3ql0b9ggzl8ijsyjy7pgiij04y" }, + "hardtime-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "m4xshen", + "repo": "hardtime.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "9aaec65de041bddfc4c0af66919030d2950bcea8", + "url": "https://github.com/m4xshen/hardtime.nvim/archive/9aaec65de041bddfc4c0af66919030d2950bcea8.tar.gz", + "hash": "1rmcl200a4m3ip3xjzhh7ghhh2961xj2mw7yf0w44jpvs98gqb18" + }, "harpoon": { "type": "Git", "repository": { From 878cf96f717cf71f8be2732ebd21698aeff499fa Mon Sep 17 00:00:00 2001 From: haskex Date: Mon, 28 Apr 2025 18:27:43 -0300 Subject: [PATCH 2/5] Changing from 'hardtime.enable = true' to 'hardtime.enable = isMaximal' in configuration.nix --- configuration.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configuration.nix b/configuration.nix index f48af0b4..dce9534a 100644 --- a/configuration.nix +++ b/configuration.nix @@ -142,9 +142,7 @@ isMaximal: { binds = { whichKey.enable = true; cheatsheet.enable = true; - - # Remove this after test - hardtime.enable = true; + hardtime.enable = isMaximal; }; telescope.enable = true; From 1f7405aaf7f9a70177a0f052df034f55f0591182 Mon Sep 17 00:00:00 2001 From: haskex Date: Wed, 30 Apr 2025 22:02:00 -0300 Subject: [PATCH 3/5] Changing options for hardtime plugin to hardtime-nvim, and adding the changelog --- configuration.nix | 2 +- docs/release-notes/rl-0.8.md | 5 +++++ modules/plugins/utility/binds/hardtime/config.nix | 2 +- modules/plugins/utility/binds/hardtime/hardtime.nix | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/configuration.nix b/configuration.nix index dce9534a..caefcc34 100644 --- a/configuration.nix +++ b/configuration.nix @@ -142,7 +142,7 @@ isMaximal: { binds = { whichKey.enable = true; cheatsheet.enable = true; - hardtime.enable = isMaximal; + hardtime-nvim.enable = isMaximal; }; telescope.enable = true; diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 294fd17b..3610aea8 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -356,3 +356,8 @@ [poz](https://poz.pet): - Fix gitsigns null-ls issue. + +[Haskex](https://github.com/haskex): + +- Add Plugin [Hardtime.nvim](https://github.com/m4xshen/hardtime.nvim). +- Add option `vim.binds.hardtime-nvim` with `enable` and `setupOpts` options. diff --git a/modules/plugins/utility/binds/hardtime/config.nix b/modules/plugins/utility/binds/hardtime/config.nix index 7f2cde73..e8c315ef 100644 --- a/modules/plugins/utility/binds/hardtime/config.nix +++ b/modules/plugins/utility/binds/hardtime/config.nix @@ -7,7 +7,7 @@ inherit (lib.nvim.lua) toLuaObject; inherit (lib.nvim.dag) entryAnywhere; - cfg = config.vim.binds.hardtime; + cfg = config.vim.binds.hardtime-nvim; in { config = mkIf cfg.enable { vim = { diff --git a/modules/plugins/utility/binds/hardtime/hardtime.nix b/modules/plugins/utility/binds/hardtime/hardtime.nix index c27c1c0d..56833b48 100644 --- a/modules/plugins/utility/binds/hardtime/hardtime.nix +++ b/modules/plugins/utility/binds/hardtime/hardtime.nix @@ -2,8 +2,8 @@ inherit (lib.options) mkEnableOption; inherit (lib.nvim.types) mkPluginSetupOption; in { - options.vim.binds.hardtime = { - enable = mkEnableOption "enable hardtime"; + options.vim.binds.hardtime-nvim = { + enable = mkEnableOption "Hardtime - A Plugin for Blocks key repeats in Neovim."; setupOpts = mkPluginSetupOption "hardtime-nvim" {}; }; From cc2c412b884cbf2731296abecc3c97321b98db23 Mon Sep 17 00:00:00 2001 From: haskex Date: Thu, 1 May 2025 12:17:31 -0300 Subject: [PATCH 4/5] Changing plugin description and testing --- modules/plugins/utility/binds/hardtime/hardtime.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/utility/binds/hardtime/hardtime.nix b/modules/plugins/utility/binds/hardtime/hardtime.nix index 56833b48..b671ddcd 100644 --- a/modules/plugins/utility/binds/hardtime/hardtime.nix +++ b/modules/plugins/utility/binds/hardtime/hardtime.nix @@ -3,7 +3,7 @@ inherit (lib.nvim.types) mkPluginSetupOption; in { options.vim.binds.hardtime-nvim = { - enable = mkEnableOption "Hardtime - A Plugin for Blocks key repeats in Neovim."; + enable = mkEnableOption "hardtime helper for no repeat keybinds"; setupOpts = mkPluginSetupOption "hardtime-nvim" {}; }; From 028bd7b4cb2c6ce2070e5b3aba0680f107b86616 Mon Sep 17 00:00:00 2001 From: Jhuan Nycolas <168754963+haskex@users.noreply.github.com> Date: Thu, 1 May 2025 15:10:00 -0300 Subject: [PATCH 5/5] Update rl-0.8.md --- docs/release-notes/rl-0.8.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 3610aea8..80a0300c 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -359,5 +359,6 @@ [Haskex](https://github.com/haskex): -- Add Plugin [Hardtime.nvim](https://github.com/m4xshen/hardtime.nvim). -- Add option `vim.binds.hardtime-nvim` with `enable` and `setupOpts` options. +[Hardtime.nvim]: https://github.com/m4xshen/hardtime.nvim + +- Add Plugin [Hardtime.nvim] under `vim.binds.hardtime-nvim` with `enable` and `setupOpts` options