diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 835ebf6e..686295e2 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./outline ./binds ./ccc ./gestures diff --git a/modules/plugins/utility/outline/aerial-nvim/aerial-nvim.nix b/modules/plugins/utility/outline/aerial-nvim/aerial-nvim.nix new file mode 100644 index 00000000..beede428 --- /dev/null +++ b/modules/plugins/utility/outline/aerial-nvim/aerial-nvim.nix @@ -0,0 +1,14 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; + inherit (lib.nvim.binds) mkMappingOption; +in { + options.vim.utility.outline.aerial-nvim = { + enable = mkEnableOption "Aerial.nvim"; + setupOpts = mkPluginSetupOption "aerial.nvim" {}; + + mappings = { + toggle = mkMappingOption "Toggle aerial window" "gO"; + }; + }; +} diff --git a/modules/plugins/utility/outline/aerial-nvim/config.nix b/modules/plugins/utility/outline/aerial-nvim/config.nix new file mode 100644 index 00000000..803302f7 --- /dev/null +++ b/modules/plugins/utility/outline/aerial-nvim/config.nix @@ -0,0 +1,42 @@ +{ + options, + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.binds) mkKeymap; + + cfg = config.vim.utility.outline.aerial-nvim; + inherit (options.vim.utility.outline.aerial-nvim) mappings; +in { + config = mkIf cfg.enable { + vim = { + lazy.plugins.aerial-nvim = { + package = "aerial-nvim"; + + setupModule = "aerial"; + inherit (cfg) setupOpts; + + cmd = [ + "AerialClose" + "AerialCloseAll" + "AerialGo" + "AerialInfo" + "AerialNavClose" + "AerialNavOpen" + "AerialNavToggle" + "AerialNext" + "AerialOpen" + "AerialOpenAll" + "AerialPrev" + "AerialToggle" + ]; + + keys = [ + (mkKeymap "n" cfg.mappings.toggle ":AerialToggle" {desc = mappings.toggle.description;}) + ]; + }; + }; + }; +} diff --git a/modules/plugins/utility/outline/aerial-nvim/default.nix b/modules/plugins/utility/outline/aerial-nvim/default.nix new file mode 100644 index 00000000..ea782c89 --- /dev/null +++ b/modules/plugins/utility/outline/aerial-nvim/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./aerial-nvim.nix + ./config.nix + ]; +} diff --git a/modules/plugins/utility/outline/default.nix b/modules/plugins/utility/outline/default.nix new file mode 100644 index 00000000..d8262edd --- /dev/null +++ b/modules/plugins/utility/outline/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./aerial-nvim + ]; +}