From ee4c072ba326b1e7765e500b2aac3281ffb0019f Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Mon, 6 Jan 2025 11:44:38 +0100 Subject: [PATCH 1/4] flake: add aerial.nvim --- flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ 2 files changed, 22 insertions(+) diff --git a/flake.lock b/flake.lock index 0a7ee1a5..4b56f7fa 100644 --- a/flake.lock +++ b/flake.lock @@ -156,6 +156,22 @@ "type": "sourcehut" } }, + "plugin-aerial-nvim": { + "flake": false, + "locked": { + "lastModified": 1736064692, + "narHash": "sha256-7YQtkUTACTMfAGoqoFDPmRrqtw+ypxDbeLCTB3sy4Us=", + "owner": "stevearc", + "repo": "aerial.nvim", + "rev": "b3ec25ca8c347fafa976484a6cace162239112e1", + "type": "github" + }, + "original": { + "owner": "stevearc", + "repo": "aerial.nvim", + "type": "github" + } + }, "plugin-alpha-nvim": { "flake": false, "locked": { @@ -2090,6 +2106,7 @@ "nil": "nil", "nixpkgs": "nixpkgs", "nmd": "nmd", + "plugin-aerial-nvim": "plugin-aerial-nvim", "plugin-alpha-nvim": "plugin-alpha-nvim", "plugin-base16": "plugin-base16", "plugin-bufdelete-nvim": "plugin-bufdelete-nvim", diff --git a/flake.nix b/flake.nix index d5a7b709..f5014afe 100644 --- a/flake.nix +++ b/flake.nix @@ -730,5 +730,10 @@ url = "github:mrcjkb/haskell-tools.nvim"; flake = false; }; + + plugin-aerial-nvim = { + url = "github:stevearc/aerial.nvim"; + flake = false; + }; }; } From 92e38fbfae40ce5aee381f5034a603ad05616be0 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Mon, 6 Jan 2025 11:44:48 +0100 Subject: [PATCH 2/4] aerial: init --- modules/plugins/utility/default.nix | 1 + .../outline/aerial-nvim/aerial-nvim.nix | 14 +++++++ .../utility/outline/aerial-nvim/config.nix | 42 +++++++++++++++++++ .../utility/outline/aerial-nvim/default.nix | 6 +++ modules/plugins/utility/outline/default.nix | 5 +++ 5 files changed, 68 insertions(+) create mode 100644 modules/plugins/utility/outline/aerial-nvim/aerial-nvim.nix create mode 100644 modules/plugins/utility/outline/aerial-nvim/config.nix create mode 100644 modules/plugins/utility/outline/aerial-nvim/default.nix create mode 100644 modules/plugins/utility/outline/default.nix 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 + ]; +} From c071f2caa22dddc61d9c6b9ee59a8397a4a64c36 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Mon, 6 Jan 2025 11:45:02 +0100 Subject: [PATCH 3/4] nvimtree: remove unnecessary import --- modules/plugins/filetree/nvimtree/config.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/plugins/filetree/nvimtree/config.nix b/modules/plugins/filetree/nvimtree/config.nix index 11fa9fed..0d0381a0 100644 --- a/modules/plugins/filetree/nvimtree/config.nix +++ b/modules/plugins/filetree/nvimtree/config.nix @@ -1,7 +1,7 @@ { + options, config, lib, - pkgs, ... }: let inherit (lib.strings) optionalString; @@ -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 = { From de02e2fa577005885966f136a7d32ecf79db4b55 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Mon, 6 Jan 2025 11:58:08 +0100 Subject: [PATCH 4/4] docs: update release notes --- docs/release-notes/rl-0.8.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 16ec2863..eb7ca0db 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -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]