Merge pull request #529 from horriblename/feat-aerial

utility/aerial.nvim: init
This commit is contained in:
raf 2025-01-06 14:00:21 +03:00 committed by GitHub
commit a1bac1d356
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 98 additions and 3 deletions

View file

@ -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]

View file

@ -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",

View file

@ -730,5 +730,10 @@
url = "github:mrcjkb/haskell-tools.nvim";
flake = false;
};
plugin-aerial-nvim = {
url = "github:stevearc/aerial.nvim";
flake = false;
};
};
}

View file

@ -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 = {

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
];
}