This repository has been archived on 2024-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
neovim/plugins/explorer/default.nix

22 lines
609 B
Nix

{ lib
, plugins ? { }
, nvim-tree-lua
, telescope-nvim
, telescope-live-grep-args-nvim
, ...
}:
let
inherit (builtins) readFile;
nvimTreeLuaSettings = lib.toLua (lib.attrByPath [ "nvimTree" "settings" ] { } plugins);
telescopeSettings = lib.toLua (lib.attrByPath [ "telescope" "settings" ] { } plugins);
in
{
luaConfig =
(readFile (lib.substituteAll { src = ./nvim-tree.lua; inherit nvimTreeLuaSettings; }))
+ (readFile (lib.substituteAll { src = ./telescope-nvim.lua; inherit telescopeSettings; }));
plugins = [ nvim-tree-lua ]
++ [ telescope-nvim telescope-live-grep-args-nvim ];
}