mirror of
https://github.com/akr2002/nv.git
synced 2024-11-09 10:39:44 +00:00
add sidebar
This commit is contained in:
parent
a5978fa59d
commit
b2828752d9
2 changed files with 57 additions and 0 deletions
|
@ -68,5 +68,6 @@
|
||||||
./utils/persistence.nix
|
./utils/persistence.nix
|
||||||
./utils/plenary.nix
|
./utils/plenary.nix
|
||||||
./utils/project-nvim.nix
|
./utils/project-nvim.nix
|
||||||
|
./utils/sidebar.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
56
config/utils/sidebar.nix
Normal file
56
config/utils/sidebar.nix
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimUtils; [
|
||||||
|
(buildVimPlugin {
|
||||||
|
pname = "sidebar.nvim";
|
||||||
|
version = "2024-02-07";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "sidebar-nvim";
|
||||||
|
repo = "sidebar.nvim";
|
||||||
|
rev = "5695712eef6288fff667343c4ae77c54911bdb1b";
|
||||||
|
sha256 = "1p12189367x0x26cys9wxipzwr3i0bmz4lb0s79ki0a49d6zja2c";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
extraConfigLua = ''
|
||||||
|
local sidebar = require("sidebar-nvim")
|
||||||
|
sidebar.setup({
|
||||||
|
disable_default_keybindings = 0,
|
||||||
|
bindings = nil,
|
||||||
|
open = false,
|
||||||
|
side = "left",
|
||||||
|
initial_width = 32,
|
||||||
|
hide_statusline = false,
|
||||||
|
update_interval = 1000,
|
||||||
|
sections = { "git", "containers" },
|
||||||
|
section_separator = {"", "-----", ""},
|
||||||
|
section_title_separator = {""},
|
||||||
|
containers = {
|
||||||
|
attach_shell = "/bin/sh", show_all = true, interval = 5000,
|
||||||
|
},
|
||||||
|
datetime = { format = "%a %b %d, %H:%M", clocks = { { name = "local" } } },
|
||||||
|
todos = { ignored_paths = {} },
|
||||||
|
["git"] = {
|
||||||
|
icon = "", --
|
||||||
|
},
|
||||||
|
})
|
||||||
|
cmd = {
|
||||||
|
"SidebarNvimToggle",
|
||||||
|
"SidebarNvimOpen",
|
||||||
|
"SidebarNvimFocus",
|
||||||
|
"SidebarNvimUpdate",
|
||||||
|
},
|
||||||
|
'';
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>e";
|
||||||
|
action = ":SidebarNvimToggle<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle Explorer";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue