feat: add cellularAutomaton keybindings

This commit is contained in:
n3oney 2023-04-15 15:35:34 +02:00
parent e21096203a
commit 6719cddbfd
No known key found for this signature in database
GPG key ID: C786693DE727850E
2 changed files with 13 additions and 6 deletions

View file

@ -67,6 +67,9 @@ in {
(mkIf cfg.cellularAutomaton.enable {
vim.startPlugins = ["cellular-automaton"];
vim.maps.normal = mkBinding cfg.cellularAutomaton.mappings.makeItRain "<cmd>CellularAutomaton make_it_rain<CR>" "Make it rain";
vim.luaConfigRC.cellularAUtomaton = nvim.dag.entryAnywhere ''
local config = {
fps = 50,
@ -90,8 +93,6 @@ in {
end
require("cellular-automaton").register_animation(config)
vim.keymap.set("n", "<leader>fml", "<cmd>CellularAutomaton make_it_rain<CR>")
'';
})

View file

@ -24,10 +24,16 @@ in {
default = false;
};
cellularAutomaton.enable = mkOption {
type = types.bool;
description = "Enable cellular automaton [cellular-automaton]";
default = false;
cellularAutomaton = {
enable = mkOption {
type = types.bool;
description = "Enable cellular automaton [cellular-automaton]";
default = false;
};
mappings = {
makeItRain = mkMappingOption "Make it rain [cellular-automaton]" "<leader>fml";
};
};
fidget-nvim = {