2023-11-07 00:50:27 +00:00
|
|
|
{lib, ...}: let
|
2024-02-17 13:13:52 +00:00
|
|
|
inherit (lib) mkRenamedOptionModule;
|
2024-02-26 05:05:23 +00:00
|
|
|
inherit (lib.options) mkEnableOption mkOption;
|
|
|
|
inherit (lib.types) enum bool;
|
2023-11-07 00:50:27 +00:00
|
|
|
in {
|
2024-02-17 13:13:52 +00:00
|
|
|
imports = [
|
|
|
|
# (mkRenamedOptionModule ["vim" "autopairs" "nvim-compe"] ["vim" "autopairs" "nvim-compe" "setupOpts"])
|
|
|
|
];
|
|
|
|
|
2023-02-27 14:53:34 +00:00
|
|
|
options.vim = {
|
|
|
|
autopairs = {
|
2023-06-05 20:10:25 +00:00
|
|
|
enable = mkEnableOption "autopairs" // {default = false;};
|
2023-02-27 14:53:34 +00:00
|
|
|
|
|
|
|
type = mkOption {
|
2024-02-26 05:05:23 +00:00
|
|
|
type = enum ["nvim-autopairs"];
|
2023-02-27 14:53:34 +00:00
|
|
|
default = "nvim-autopairs";
|
|
|
|
description = "Set the autopairs type. Options: nvim-autopairs [nvim-autopairs]";
|
|
|
|
};
|
|
|
|
|
2024-02-17 13:13:52 +00:00
|
|
|
nvim-compe.setupOpts = lib.nvim.types.mkPluginSetupOption "nvim-compe" {
|
2023-02-27 14:53:34 +00:00
|
|
|
map_cr = mkOption {
|
2024-02-26 05:05:23 +00:00
|
|
|
type = bool;
|
2023-02-27 14:53:34 +00:00
|
|
|
default = true;
|
2023-11-04 11:30:04 +00:00
|
|
|
description = ''map <CR> on insert mode'';
|
2023-02-27 14:53:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
map_complete = mkOption {
|
2024-02-26 05:05:23 +00:00
|
|
|
type = bool;
|
2023-02-27 14:53:34 +00:00
|
|
|
default = true;
|
|
|
|
description = "auto insert `(` after select function or method item";
|
|
|
|
};
|
|
|
|
|
|
|
|
auto_select = mkOption {
|
2024-02-26 05:05:23 +00:00
|
|
|
type = bool;
|
2023-02-27 14:53:34 +00:00
|
|
|
default = false;
|
|
|
|
description = "auto select first item";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|