mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 09:48:42 +02:00
38 lines
816 B
Nix
38 lines
816 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 = 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
|
|
];
|
|
};
|
|
|
|
};
|
|
}
|