nix-community.nixvim/plugins/telescope/media-files.nix
Alexander Nortung 3bce3ed48f
telescope.media_files: init (#29)
* telescope.media_files: init

* telescope-media: fix typo

`nollOr` -> `nullOr`

Co-authored-by: Pedro Alves <pta2002@users.noreply.github.com>
2022-08-28 00:26:03 +01:00

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
];
};
};
}