plugins/neo-tree: init module

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

View File

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

View File

@ -1,5 +1,6 @@
{
imports = [
./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 = [
./config.nix
./nvimtree.nix