Skip to content

Commit

Permalink
Merge pull request #529 from horriblename/feat-aerial
Browse files Browse the repository at this point in the history
utility/aerial.nvim: init
  • Loading branch information
NotAShelf authored Jan 6, 2025
2 parents 9888a27 + de02e2f commit a1bac1d
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 3 deletions.
6 changes: 6 additions & 0 deletions docs/release-notes/rl-0.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@

- Disable the built-in format-on-save feature of zls. Use `vim.lsp.formatOnSave`
instead.

[horriblename](https://github.com/horriblename):

[aerial.nvim](https://github.com/stevearc/aerial.nvim)

- Add [aerial.nvim]
17 changes: 17 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -730,5 +730,10 @@
url = "github:mrcjkb/haskell-tools.nvim";
flake = false;
};

plugin-aerial-nvim = {
url = "github:stevearc/aerial.nvim";
flake = false;
};
};
}
5 changes: 2 additions & 3 deletions modules/plugins/filetree/nvimtree/config.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
options,
config,
lib,
pkgs,
...
}: let
inherit (lib.strings) optionalString;
Expand All @@ -11,8 +11,7 @@
inherit (lib.nvim.binds) pushDownDefault;

cfg = config.vim.filetree.nvimTree;
self = import ./nvimtree.nix {inherit pkgs lib;};
inherit (self.options.vim.filetree.nvimTree) mappings;
inherit (options.vim.filetree.nvimTree) mappings;
in {
config = mkIf cfg.enable {
vim = {
Expand Down
1 change: 1 addition & 0 deletions modules/plugins/utility/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
imports = [
./outline
./binds
./ccc
./gestures
Expand Down
14 changes: 14 additions & 0 deletions modules/plugins/utility/outline/aerial-nvim/aerial-nvim.nix
Original file line number Diff line number Diff line change
@@ -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";
};
};
}
42 changes: 42 additions & 0 deletions modules/plugins/utility/outline/aerial-nvim/config.nix
Original file line number Diff line number Diff line change
@@ -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;})
];
};
};
};
}
6 changes: 6 additions & 0 deletions modules/plugins/utility/outline/aerial-nvim/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
imports = [
./aerial-nvim.nix
./config.nix
];
}
5 changes: 5 additions & 0 deletions modules/plugins/utility/outline/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
imports = [
./aerial-nvim
];
}

0 comments on commit a1bac1d

Please sign in to comment.