mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
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>
This commit is contained in:
parent
3bb3b7efb5
commit
3bce3ed48f
2 changed files with 39 additions and 0 deletions
|
@ -9,6 +9,7 @@ in
|
||||||
./frecency.nix
|
./frecency.nix
|
||||||
./fzf-native.nix
|
./fzf-native.nix
|
||||||
./fzy-native.nix
|
./fzy-native.nix
|
||||||
|
./media-files.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# TODO:add support for aditional filetypes. This requires autocommands!
|
# TODO:add support for aditional filetypes. This requires autocommands!
|
||||||
|
|
38
plugins/telescope/media-files.nix
Normal file
38
plugins/telescope/media-files.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{ 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue