feat(autopairs): custom setup opts

This commit is contained in:
Ching Pei Yang 2024-02-17 14:13:52 +01:00
commit 3d350bcfe4
2 changed files with 9 additions and 11 deletions

View file

@ -1,5 +1,5 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.options) mkEnableOption mkOption mkRenamedOptionModule;
inherit (lib.types) enum bool;
in {
options.vim = {
@ -12,7 +12,11 @@ in {
description = "Set the autopairs type. Options: nvim-autopairs [nvim-autopairs]";
};
nvim-compe = {
imports = [
(mkRenamedOptionModule ["vim" "autopairs" "nvim-compe"] ["vim" "autopairs" "nvim-compe" "setupOpts"])
];
nvim-compe.setupOpts = lib.nvim.types.mkPluginSetupOption {
map_cr = mkOption {
type = bool;
default = true;