mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-01-19 16:32:24 +00:00
mini/surround: init
This commit is contained in:
parent
d1fa88595b
commit
8809ecd689
7 changed files with 62 additions and 0 deletions
|
@ -89,6 +89,7 @@
|
||||||
- `mini.splitjoin`
|
- `mini.splitjoin`
|
||||||
- `mini.starter`
|
- `mini.starter`
|
||||||
- `mini.statusline`
|
- `mini.statusline`
|
||||||
|
- `mini.surround`
|
||||||
|
|
||||||
[kaktu5](https://github.com/kaktu5):
|
[kaktu5](https://github.com/kaktu5):
|
||||||
|
|
||||||
|
|
17
flake.lock
17
flake.lock
|
@ -1496,6 +1496,22 @@
|
||||||
"type": "github"
|
"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": {
|
"plugin-minimap-vim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -2727,6 +2743,7 @@
|
||||||
"plugin-mini-splitjoin": "plugin-mini-splitjoin",
|
"plugin-mini-splitjoin": "plugin-mini-splitjoin",
|
||||||
"plugin-mini-starter": "plugin-mini-starter",
|
"plugin-mini-starter": "plugin-mini-starter",
|
||||||
"plugin-mini-statusline": "plugin-mini-statusline",
|
"plugin-mini-statusline": "plugin-mini-statusline",
|
||||||
|
"plugin-mini-surround": "plugin-mini-surround",
|
||||||
"plugin-minimap-vim": "plugin-minimap-vim",
|
"plugin-minimap-vim": "plugin-minimap-vim",
|
||||||
"plugin-modes-nvim": "plugin-modes-nvim",
|
"plugin-modes-nvim": "plugin-modes-nvim",
|
||||||
"plugin-neo-tree-nvim": "plugin-neo-tree-nvim",
|
"plugin-neo-tree-nvim": "plugin-neo-tree-nvim",
|
||||||
|
|
|
@ -920,5 +920,10 @@
|
||||||
url = "github:echasnovski/mini.statusline";
|
url = "github:echasnovski/mini.statusline";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugin-mini-surround = {
|
||||||
|
url = "github:echasnovski/mini.surround";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,5 +35,6 @@
|
||||||
./splitjoin
|
./splitjoin
|
||||||
./starter
|
./starter
|
||||||
./statusline
|
./statusline
|
||||||
|
./surround
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
19
modules/plugins/mini/surround/config.nix
Normal file
19
modules/plugins/mini/surround/config.nix
Normal 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})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
6
modules/plugins/mini/surround/default.nix
Normal file
6
modules/plugins/mini/surround/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./surround.nix
|
||||||
|
./config.nix
|
||||||
|
];
|
||||||
|
}
|
13
modules/plugins/mini/surround/surround.nix
Normal file
13
modules/plugins/mini/surround/surround.nix
Normal 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" {};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue