mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-27 19:18:57 +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..
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ pkgs, config, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.plugins.telescope.extensions.fzf-native;
|
|
in
|
|
{
|
|
options.plugins.telescope.extensions.fzf-native = {
|
|
enable = mkEnableOption "Enable fzf-native";
|
|
|
|
fuzzy = mkOption {
|
|
type = types.nullOr types.bool;
|
|
description = "Whether to fuzzy search. False will do exact matching";
|
|
default = null;
|
|
};
|
|
overrideGenericSorter = mkOption {
|
|
type = types.nullOr types.bool;
|
|
description = "Override the generice sorter";
|
|
default = null;
|
|
};
|
|
overrideFileSorter = mkOption {
|
|
type = types.nullOr types.bool;
|
|
description = "Override the file sorter";
|
|
default = null;
|
|
};
|
|
caseMode = mkOption {
|
|
type = types.nullOr (types.enum [ "smart_case" "ignore_case" "respect_case" ]);
|
|
default = null;
|
|
};
|
|
};
|
|
|
|
config = let
|
|
configuration = {
|
|
fuzzy = cfg.fuzzy;
|
|
override_generic_sorter = cfg.overrideGenericSorter;
|
|
override_file_sorter = cfg.overrideFileSorter;
|
|
case_mode = cfg.caseMode;
|
|
};
|
|
in mkIf cfg.enable {
|
|
extraPlugins = [ pkgs.vimPlugins.telescope-fzf-native-nvim ];
|
|
|
|
plugins.telescope.enabledExtensions = [ "fzf" ];
|
|
plugins.telescope.extensionConfig."fzf" = configuration;
|
|
};
|
|
}
|