mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-09 14:45:58 +01:00
plugins/neo-tree: init module
This commit is contained in:
parent
9d0247c599
commit
ba98b2d627
6 changed files with 42 additions and 1 deletions
|
@ -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";
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./nvimtree
|
||||
./neo-tree
|
||||
];
|
||||
}
|
||||
|
|
20
modules/plugins/filetree/neo-tree/config.nix
Normal file
20
modules/plugins/filetree/neo-tree/config.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
}
|
6
modules/plugins/filetree/neo-tree/default.nix
Normal file
6
modules/plugins/filetree/neo-tree/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./neo-tree.nix
|
||||
];
|
||||
}
|
9
modules/plugins/filetree/neo-tree/neo-tree.nix
Normal file
9
modules/plugins/filetree/neo-tree/neo-tree.nix
Normal 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" {};
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
_: {
|
||||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./nvimtree.nix
|
||||
|
|
Loading…
Reference in a new issue