mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
* telescope.media_files: init * telescope-media: fix typo `nollOr` -> `nullOr` Co-authored-by: Pedro Alves <pta2002@users.noreply.github.com>
38 lines
823 B
Nix
38 lines
823 B
Nix
{ pkgs, config, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.programs.nixvim.plugins.telescope.extensions.media_files;
|
|
in
|
|
{
|
|
options.programs.nixvim.plugins.telescope.extensions.media_files = {
|
|
enable = mkEnableOption "Enable media_files extension for telescope";
|
|
|
|
filetypes = mkOption {
|
|
default = types.null;
|
|
type = with types; nullOr (listOf str);
|
|
};
|
|
|
|
find_cmd = mkOption {
|
|
default = null;
|
|
type = with types; nullOr str;
|
|
example = ''"rg"'';
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
programs.nixvim = {
|
|
plugins.telescope.enabledExtensions = [ "media_files" ];
|
|
|
|
extraPlugins = with pkgs.vimPlugins; [
|
|
popup-nvim
|
|
plenary-nvim
|
|
telescope-media-files-nvim
|
|
];
|
|
|
|
extraPackages = with pkgs; [
|
|
ueberzug
|
|
];
|
|
};
|
|
|
|
};
|
|
}
|