mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
This represents a major rearchitecture for nixvim, so I'm leaving this up to track the progress for now, and to serve as a reference for any breaking changes during transition. The main change is, of course, being able to use nixvim standalone. To do this, you should use the new build function, which takes in two arguments: the system architecture (e.g. x86_64-linux) and the configuration. For the new configuration, do not use the programs.nixvim. prefix. For module development, the main change is that you should no longer prefix your modules with programs.nixvim..
35 lines
734 B
Nix
35 lines
734 B
Nix
{ pkgs, config, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.plugins.telescope.extensions.media_files;
|
|
in
|
|
{
|
|
options.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 {
|
|
plugins.telescope.enabledExtensions = [ "media_files" ];
|
|
|
|
extraPlugins = with pkgs.vimPlugins; [
|
|
popup-nvim
|
|
plenary-nvim
|
|
telescope-media-files-nvim
|
|
];
|
|
|
|
extraPackages = with pkgs; [
|
|
ueberzug
|
|
];
|
|
};
|
|
}
|