neovim-flake/modules/plugins/filetree/neo-tree/config.nix

29 lines
581 B
Nix
Raw Normal View History

2024-04-14 14:49:16 +02:00
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
2024-04-14 14:49:16 +02:00
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"
];
luaConfigRC.neo-tree = entryAnywhere ''
require("neo-tree").setup(${toLuaObject cfg.setupOpts})
'';
};
2024-04-14 14:49:16 +02:00
};
}