add sidebar

This commit is contained in:
Aditya 2024-03-06 19:50:04 +05:30
parent a5978fa59d
commit b2828752d9
Signed by: aditya
SSH key fingerprint: SHA256:jL1IvWsjjlPtw6HvDIHfXfhO9IkIokNEyIfuFhSdoyU
2 changed files with 57 additions and 0 deletions

View file

@ -68,5 +68,6 @@
./utils/persistence.nix
./utils/plenary.nix
./utils/project-nvim.nix
./utils/sidebar.nix
];
}

56
config/utils/sidebar.nix Normal file
View 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;
};
}
];
}