add aerial
This commit is contained in:
parent
4bdb8fdc60
commit
aaf656431a
2 changed files with 72 additions and 0 deletions
51
plugins/aerial/default.nix
Normal file
51
plugins/aerial/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{ lib, pkgs, ...}:
|
||||||
|
{
|
||||||
|
extra = {
|
||||||
|
packages = [
|
||||||
|
(import ./package.nix { inherit lib pkgs; })
|
||||||
|
];
|
||||||
|
|
||||||
|
config = ''
|
||||||
|
require("aerial").setup({
|
||||||
|
backends = { "lsp", "treesitter", "markdown", "man" },
|
||||||
|
layout = { min_width = 28, placement = "edge" },
|
||||||
|
show_guides = true,
|
||||||
|
filter_kind = false,
|
||||||
|
|
||||||
|
guides = {
|
||||||
|
mid_item = "├ ",
|
||||||
|
last_item = "└ ",
|
||||||
|
nested_top = "│ ",
|
||||||
|
whitespace = " ",
|
||||||
|
},
|
||||||
|
autojump = true,
|
||||||
|
keymaps = {
|
||||||
|
["[y"] = "actions.prev",
|
||||||
|
["]y"] = "actions.next",
|
||||||
|
["[Y"] = "actions.prev_up",
|
||||||
|
["]Y"] = "actions.next_up",
|
||||||
|
["{"] = false,
|
||||||
|
["}"] = false,
|
||||||
|
["[["] = false,
|
||||||
|
["]]"] = false,
|
||||||
|
},
|
||||||
|
attach_mode = "global",
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
rootOpts.keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>lo";
|
||||||
|
action.__raw = ''function() require("aerial").toggle() end'';
|
||||||
|
options.desc = "Symbols outline";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>fs";
|
||||||
|
action.__raw = ''require("telescope").extensions.aerial.aerial'';
|
||||||
|
options.desc = "Find symbols";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
21
plugins/aerial/package.nix
Normal file
21
plugins/aerial/package.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ pkgs, ...}:
|
||||||
|
let
|
||||||
|
version = "2.1.0";
|
||||||
|
in
|
||||||
|
pkgs.vimUtils.buildVimPlugin {
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
name = "aerial";
|
||||||
|
|
||||||
|
# src = pkgs.fetchFromGitHub {
|
||||||
|
# owner = "stevearc";
|
||||||
|
# repo = "aerial.nvim";
|
||||||
|
# rev = "v${version}";
|
||||||
|
# hash = "sha256:0ip8xmncp82svlbkphlas88xjvzrpzyy5b1c9x06dqbm4ifai0va";
|
||||||
|
# };
|
||||||
|
|
||||||
|
src = builtins.fetchTarball {
|
||||||
|
url = "http://github.com/stevearc/aerial.nvim/archive/v2.1.0.tar.gz";
|
||||||
|
sha256 = "sha256:0ip8xmncp82svlbkphlas88xjvzrpzyy5b1c9x06dqbm4ifai0va";
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue