mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-23 21:09:48 +01:00
feat: add cellularAutomaton keybindings
This commit is contained in:
parent
e21096203a
commit
6719cddbfd
2 changed files with 13 additions and 6 deletions
|
@ -67,6 +67,9 @@ in {
|
||||||
|
|
||||||
(mkIf cfg.cellularAutomaton.enable {
|
(mkIf cfg.cellularAutomaton.enable {
|
||||||
vim.startPlugins = ["cellular-automaton"];
|
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 ''
|
vim.luaConfigRC.cellularAUtomaton = nvim.dag.entryAnywhere ''
|
||||||
local config = {
|
local config = {
|
||||||
fps = 50,
|
fps = 50,
|
||||||
|
@ -90,8 +93,6 @@ in {
|
||||||
end
|
end
|
||||||
|
|
||||||
require("cellular-automaton").register_animation(config)
|
require("cellular-automaton").register_animation(config)
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>fml", "<cmd>CellularAutomaton make_it_rain<CR>")
|
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -24,12 +24,18 @@ in {
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
cellularAutomaton.enable = mkOption {
|
cellularAutomaton = {
|
||||||
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = "Enable cellular automaton [cellular-automaton]";
|
description = "Enable cellular automaton [cellular-automaton]";
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
makeItRain = mkMappingOption "Make it rain [cellular-automaton]" "<leader>fml";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
fidget-nvim = {
|
fidget-nvim = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
|
Loading…
Reference in a new issue