nvf/modules/plugins/utility/multicursors/config.nix
Joe Hanson b9941583fd
utility/multicursors-nvim: init #610)
* feat: add multicursors-nvim plugin

multicursors-nvim with hydra dependency and static config.

* add most used default options

* add more descriptions and refine

* disable debug mode

* maximal by default

* add multicursors addition to changelog

* Update modules/plugins/hydra/hydra.nix

place hydra plugin in utility folder

Co-authored-by: raf <raf@notashelf.dev>

* clean up hydra config and implementation

* mention hydra dependency addition

* update to using npins instead of flake based additions.

---------

Co-authored-by: raf <raf@notashelf.dev>
Co-authored-by: raf <me@notashelf.dev>
2025-02-22 16:41:38 +00:00

36 lines
957 B
Nix

{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim.utility.multicursors;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = ["hydra-nvim"];
lazy.plugins."multicursors-nvim" = {
package = "multicursors-nvim";
setupModule = "multicursors";
inherit (cfg) setupOpts;
event = ["DeferredUIEnter"];
cmd = ["MCstart" "MCvisual" "MCclear" "MCpattern" "MCvisualPattern" "MCunderCursor"];
keys = [
{
mode = ["v" "n"];
key = "<leader>mcs";
action = ":MCstart<cr>";
desc = "Create a selection for selected text or word under the cursor [multicursors.nvim]";
}
{
mode = ["v" "n"];
key = "<leader>mcp";
action = ":MCpattern<cr>";
desc = "Create a selection for pattern entered [multicursors.nvim]";
}
];
};
};
};
}