mini/surround: init

This commit is contained in:
LilleAila 2025-01-17 21:18:42 +01:00
parent d1fa88595b
commit 8809ecd689
No known key found for this signature in database
GPG key ID: D1ACCDCF2B9B9799
7 changed files with 62 additions and 0 deletions

View file

@ -89,6 +89,7 @@
- `mini.splitjoin`
- `mini.starter`
- `mini.statusline`
- `mini.surround`
[kaktu5](https://github.com/kaktu5):

View file

@ -1496,6 +1496,22 @@
"type": "github"
}
},
"plugin-mini-surround": {
"flake": false,
"locked": {
"lastModified": 1733662812,
"narHash": "sha256-okWJlG0KOdg1ShvkIIMnPSoOzGd7K84eDcp5kx6eVP8=",
"owner": "echasnovski",
"repo": "mini.surround",
"rev": "aa5e245829dd12d8ff0c96ef11da28681d6049aa",
"type": "github"
},
"original": {
"owner": "echasnovski",
"repo": "mini.surround",
"type": "github"
}
},
"plugin-minimap-vim": {
"flake": false,
"locked": {
@ -2727,6 +2743,7 @@
"plugin-mini-splitjoin": "plugin-mini-splitjoin",
"plugin-mini-starter": "plugin-mini-starter",
"plugin-mini-statusline": "plugin-mini-statusline",
"plugin-mini-surround": "plugin-mini-surround",
"plugin-minimap-vim": "plugin-minimap-vim",
"plugin-modes-nvim": "plugin-modes-nvim",
"plugin-neo-tree-nvim": "plugin-neo-tree-nvim",

View file

@ -920,5 +920,10 @@
url = "github:echasnovski/mini.statusline";
flake = false;
};
plugin-mini-surround = {
url = "github:echasnovski/mini.surround";
flake = false;
};
};
}

View file

@ -35,5 +35,6 @@
./splitjoin
./starter
./statusline
./surround
];
}

View file

@ -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.surround;
in {
vim = mkIf cfg.enable {
startPlugins = ["mini-surround"];
pluginRC.mini-surround = entryAnywhere ''
require("mini.surround").setup(${toLuaObject cfg.setupOpts})
'';
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./surround.nix
./config.nix
];
}

View file

@ -0,0 +1,13 @@
{
config,
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.mini.surround = {
enable = mkEnableOption "mini.surround";
setupOpts = mkPluginSetupOption "mini.surround" {};
};
}