mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-09 03:56:11 +00:00
Generated using:
- `sd -F "inherit (lib.nvim.binds) mkMappingOption;" "inherit (config.vim.lib) mkMappingOption;" $(find . -type f)`
- `sd -F "{lib, ...}: let" "{config, lib, ...}: let" $(find . -type f)`
Tweaked manually (placement in inherit list, fixing todo-comments and toggleterm).
Ran `nix run nixpkgs#deadnix -- -e` to clean up.
Next commit includes unrelated dead code.
30 lines
891 B
Nix
30 lines
891 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.options) mkEnableOption mkOption;
|
|
inherit (lib.types) bool;
|
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
|
inherit (config.vim.lib) mkMappingOption;
|
|
in {
|
|
options.vim.utility.yazi-nvim = {
|
|
enable = mkEnableOption ''
|
|
companion plugin for the yazi terminal file manager [yazi-nvim]
|
|
'';
|
|
|
|
mappings = {
|
|
openYazi = mkMappingOption "Open yazi at the current file [yazi.nvim]" "<leader>-";
|
|
openYaziDir = mkMappingOption "Open the file manager in nvim's working directory [yazi.nvim]" "<leader>cw";
|
|
yaziToggle = mkMappingOption "Resume the last yazi session [yazi.nvim]" "<c-up>";
|
|
};
|
|
|
|
setupOpts = mkPluginSetupOption "yazi-nvim" {
|
|
open_for_directories = mkOption {
|
|
type = bool;
|
|
default = false;
|
|
description = "Whether to open Yazi instead of netrw";
|
|
};
|
|
};
|
|
};
|
|
}
|