mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-12 00:15:30 +00:00
feat: add multicursors-nvim plugin
multicursors-nvim with hydra dependency and static config.
This commit is contained in:
parent
9443273297
commit
09695f4fd4
11 changed files with 326 additions and 0 deletions
50
modules/plugins/hydra/config.nix
Normal file
50
modules/plugins/hydra/config.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
cfg = config.vim.hydra;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = [];
|
||||
lazy.plugins.hydra = {
|
||||
package = "hydra-nvim";
|
||||
setupModule = "hydra";
|
||||
#inherit (cfg) setupOpts;
|
||||
setupOpts = {
|
||||
debug = false;
|
||||
exit = false;
|
||||
foreign_keys = null;
|
||||
color = "red";
|
||||
timeout = false;
|
||||
invoke_on_body = false;
|
||||
hint = {
|
||||
show_name = true;
|
||||
position = "bottom";
|
||||
offset = 0;
|
||||
float_opts = {};
|
||||
};
|
||||
on_enter = null;
|
||||
on_exit = null;
|
||||
on_key = null;
|
||||
};
|
||||
|
||||
after = ''
|
||||
-- custom lua code to run after plugin is loaded
|
||||
print('multicursors loaded')
|
||||
'';
|
||||
|
||||
event = ["DeferredUIEnter"];
|
||||
cmd = ["MCstart" "MCvisual" "MCclear" "MCpattern" "MCvisualPattern" "MCunderCursor"];
|
||||
};
|
||||
#keys = [
|
||||
# (mkKeymap "n" mappings.mcStart "<cmd>MCstart<cr>" {desc = "Create a selection for selected text or word under the cursor [multicursors.nvim]";})
|
||||
#];
|
||||
# dependencies = [
|
||||
# config.vim.lazy.plugins.hydra # hydra.nvim - Create custom submodes and menus
|
||||
# ];
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/plugins/hydra/default.nix
Normal file
6
modules/plugins/hydra/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./hydra.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
8
modules/plugins/hydra/hydra.nix
Normal file
8
modules/plugins/hydra/hydra.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{lib, ...}: let
|
||||
#inherit (lib) types;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
options.vim.hydra = {
|
||||
enable = mkEnableOption "Creating custom submodes and menus [nvimtools/hydra.nvim]";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue