diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 379195b7..1d683202 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -92,6 +92,7 @@ - `mini.surround` - `mini.tabline` - `mini.test` + - `mini.trailspace` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index fb274a3e..c7a57499 100644 --- a/flake.lock +++ b/flake.lock @@ -1544,6 +1544,22 @@ "type": "github" } }, + "plugin-mini-trailspace": { + "flake": false, + "locked": { + "lastModified": 1725613928, + "narHash": "sha256-JKYvFz8g8kVZvxE44RhwoHXQykghXx7ebW/Mj1ZdJIw=", + "owner": "echasnovski", + "repo": "mini.trailspace", + "rev": "3a328e62559c33014e422fb9ae97afc4208208b1", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.trailspace", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2778,6 +2794,7 @@ "plugin-mini-surround": "plugin-mini-surround", "plugin-mini-tabline": "plugin-mini-tabline", "plugin-mini-test": "plugin-mini-test", + "plugin-mini-trailspace": "plugin-mini-trailspace", "plugin-minimap-vim": "plugin-minimap-vim", "plugin-modes-nvim": "plugin-modes-nvim", "plugin-neo-tree-nvim": "plugin-neo-tree-nvim", diff --git a/flake.nix b/flake.nix index b6262653..106d2bdd 100644 --- a/flake.nix +++ b/flake.nix @@ -935,5 +935,10 @@ url = "github:echasnovski/mini.test"; flake = false; }; + + plugin-mini-trailspace = { + url = "github:echasnovski/mini.trailspace"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 1025a927..89d28999 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -38,5 +38,6 @@ ./surround ./tabline ./test + ./trailspace ]; } diff --git a/modules/plugins/mini/trailspace/config.nix b/modules/plugins/mini/trailspace/config.nix new file mode 100644 index 00000000..6ed9ba8a --- /dev/null +++ b/modules/plugins/mini/trailspace/config.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.mini.trailspace; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-trailspace"]; + + pluginRC.mini-trailspace = entryAnywhere '' + require("mini.trailspace").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/trailspace/default.nix b/modules/plugins/mini/trailspace/default.nix new file mode 100644 index 00000000..7e9adcba --- /dev/null +++ b/modules/plugins/mini/trailspace/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./trailspace.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/trailspace/trailspace.nix b/modules/plugins/mini/trailspace/trailspace.nix new file mode 100644 index 00000000..003e159c --- /dev/null +++ b/modules/plugins/mini/trailspace/trailspace.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.trailspace = { + enable = mkEnableOption "mini.trailspace"; + setupOpts = mkPluginSetupOption "mini.trailspace" {}; + }; +}