mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
Gabriel Arazas
ac4b36d550
Hope nothing like this ever happen again. It's a pain to track where errors are coming from when debugging nixpkgs modules. T_T
40 lines
937 B
Nix
40 lines
937 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.mkPluginPackageOption "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})
|
|
'';
|
|
};
|
|
}
|