mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-06 07:14:31 +02:00
plugins/utils: move to by-name
This commit is contained in:
parent
faff32b9f1
commit
52f125679f
195 changed files with 2 additions and 102 deletions
50
plugins/by-name/hydra/default.nix
Normal file
50
plugins/by-name/hydra/default.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
lib,
|
||||
helpers,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
helpers.neovim-plugin.mkNeovimPlugin {
|
||||
name = "hydra";
|
||||
originalName = "hydra.nvim";
|
||||
package = "hydra-nvim";
|
||||
|
||||
maintainers = [ maintainers.GaetanLepage ];
|
||||
|
||||
extraOptions = {
|
||||
# A list of `Hydra` definitions
|
||||
hydras = import ./hydras-option.nix { inherit lib helpers; };
|
||||
};
|
||||
|
||||
settingsOptions = import ./settings-options.nix { inherit lib helpers; };
|
||||
|
||||
settingsExample = {
|
||||
exit = false;
|
||||
foreign_keys = "run";
|
||||
color = "red";
|
||||
buffer = true;
|
||||
invoke_on_body = false;
|
||||
desc = null;
|
||||
on_enter = ''
|
||||
function()
|
||||
print('hello')
|
||||
end
|
||||
'';
|
||||
timeout = 5000;
|
||||
hint = false;
|
||||
};
|
||||
|
||||
callSetup = false;
|
||||
extraConfig = cfg: {
|
||||
extraConfigLua = ''
|
||||
hydra = require('hydra')
|
||||
|
||||
hydra.setup(${helpers.toLuaObject cfg.settings})
|
||||
|
||||
__hydra_defs = ${helpers.toLuaObject cfg.hydras}
|
||||
for _, hydra_config in ipairs(__hydra_defs) do
|
||||
hydra(hydra_config)
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue