utility/oil-nvim: init

This commit is contained in:
raf 2025-03-29 21:06:11 +03:00
commit fce24ec604
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
6 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,20 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.utility.oil-nvim;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = ["oil-nvim"];
pluginRC.snacks-nvim = entryAnywhere ''
require("oil").setup(${toLuaObject cfg.setupOpts});
'';
};
};
}

View file

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

View file

@ -0,0 +1,12 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.utility.oil-nvim = {
enable = mkEnableOption ''
Neovim file explorer: edit your filesystem like a buffer [oil-nvim]
'';
setupOpts = mkPluginSetupOption "oil-nvim" {};
};
}