mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
utility/oil-nvim: init
This commit is contained in:
parent
701dd911eb
commit
fce24ec604
6 changed files with 56 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
./multicursors
|
||||
./new-file-template
|
||||
./nix-develop
|
||||
./oil-nvim
|
||||
./outline
|
||||
./preview
|
||||
./snacks-nvim
|
||||
|
|
20
modules/plugins/utility/oil-nvim/config.nix
Normal file
20
modules/plugins/utility/oil-nvim/config.nix
Normal 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});
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
6
modules/plugins/utility/oil-nvim/default.nix
Normal file
6
modules/plugins/utility/oil-nvim/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./oil-nvim.nix
|
||||
];
|
||||
}
|
12
modules/plugins/utility/oil-nvim/oil-nvim.nix
Normal file
12
modules/plugins/utility/oil-nvim/oil-nvim.nix
Normal 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" {};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue