aerial: init

This commit is contained in:
Ching Pei Yang 2025-01-06 11:44:48 +01:00
parent ee4c072ba3
commit 92e38fbfae
No known key found for this signature in database
GPG key ID: B3841364253DC4C8
5 changed files with 68 additions and 0 deletions

View file

@ -1,5 +1,6 @@
{
imports = [
./outline
./binds
./ccc
./gestures

View file

@ -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";
};
};
}

View file

@ -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<CR>" {desc = mappings.toggle.description;})
];
};
};
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./aerial-nvim.nix
./config.nix
];
}

View file

@ -0,0 +1,5 @@
{
imports = [
./aerial-nvim
];
}