mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 16:57:55 +00:00
40 lines
931 B
Nix
40 lines
931 B
Nix
|
{ config, lib, pkgs, helpers, ... }:
|
||
|
|
||
|
let
|
||
|
cfg = config.plugins.dressing-nvim;
|
||
|
in
|
||
|
{
|
||
|
options.plugins.dressing-nvim = {
|
||
|
enable = lib.mkEnableOption "dressing.nvim configuration";
|
||
|
|
||
|
package = helpers.mkPackageOption "dressing.nvim" pkgs.vimPlugins.dressing-nvim;
|
||
|
|
||
|
settings = lib.mkOption {
|
||
|
type = with lib.types; attrsOf anything;
|
||
|
default = { };
|
||
|
example = {
|
||
|
input = {
|
||
|
enabled = true;
|
||
|
default_prompt = "Input";
|
||
|
trim_prompt = false;
|
||
|
};
|
||
|
select = {
|
||
|
enabled = true;
|
||
|
backend = [ "telescope" "fzf_lua" "builtin" "nui" ];
|
||
|
};
|
||
|
};
|
||
|
description = ''
|
||
|
Settings to be passed as argument to plugin's `setup` method.
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
extraPlugins = [ cfg.package ];
|
||
|
|
||
|
extraConfigLua = ''
|
||
|
require('dressing').setup(${helpers.toLuaObject cfg.settings})
|
||
|
'';
|
||
|
};
|
||
|
}
|