2023-02-27 17:53:34 +03:00
|
|
|
{
|
|
|
|
config,
|
2024-02-26 08:05:23 +03:00
|
|
|
lib,
|
2023-02-27 17:53:34 +03:00
|
|
|
...
|
2023-11-06 17:50:27 -07:00
|
|
|
}: let
|
2024-02-26 08:05:23 +03:00
|
|
|
inherit (lib.modules) mkIf;
|
2024-06-25 14:01:44 +02:00
|
|
|
inherit (lib.trivial) boolToString;
|
2024-02-17 14:13:52 +01:00
|
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
2023-11-06 17:50:27 -07:00
|
|
|
|
2023-02-27 17:53:34 +03:00
|
|
|
cfg = config.vim.autopairs;
|
|
|
|
in {
|
2024-02-26 08:05:23 +03:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
vim.startPlugins = ["nvim-autopairs"];
|
2023-02-27 17:53:34 +03:00
|
|
|
|
2024-07-20 10:30:48 +02:00
|
|
|
vim.pluginRC.autopairs = entryAnywhere ''
|
2024-06-25 14:01:44 +02:00
|
|
|
require("nvim-autopairs").setup({ map_cr = ${boolToString (!config.vim.autocomplete.enable)} })
|
2024-02-26 08:05:23 +03:00
|
|
|
'';
|
|
|
|
};
|
2023-02-27 17:53:34 +03:00
|
|
|
}
|