plugins/neo-tree: init module

This commit is contained in:
NotAShelf 2024-04-14 15:49:16 +03:00
parent bba0ba92a6
commit d0ca3f8a4c
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
6 changed files with 42 additions and 1 deletions

View file

@ -223,6 +223,11 @@
flake = false; flake = false;
}; };
plugin-neo-tree-nvim = {
url = "github:nvim-neo-tree/neo-tree.nvim";
flake = false;
};
# Tablines # Tablines
plugin-nvim-bufferline-lua = { plugin-nvim-bufferline-lua = {
url = "github:akinsho/nvim-bufferline.lua"; url = "github:akinsho/nvim-bufferline.lua";

View file

@ -1,5 +1,6 @@
{ {
imports = [ imports = [
./nvimtree ./nvimtree
./neo-tree
]; ];
} }

View file

@ -0,0 +1,20 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim.filetree.neo-tree;
in {
config = mkIf cfg.enable {
vim.startPlugins = [
# dependencies
"plenary-nvim" # commons library
"image-nvim" # optional for image previews
"nui-nvim" # ui library
# neotree
"neo-tree-nvim"
];
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./config.nix
./neo-tree.nix
];
}

View file

@ -0,0 +1,9 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.filetree.nvimTree = {
enable = mkEnableOption "filetree via neo-tree.nvim";
setupOpts = mkPluginSetupOption "neo-tree" {};
};
}

View file

@ -1,4 +1,4 @@
_: { {
imports = [ imports = [
./config.nix ./config.nix
./nvimtree.nix ./nvimtree.nix