2023-02-27 15:53:34 +01:00
|
|
|
{
|
|
|
|
config,
|
2024-02-26 06:05:23 +01:00
|
|
|
lib,
|
2023-02-27 15:53:34 +01:00
|
|
|
...
|
2023-11-07 01:50:27 +01:00
|
|
|
}: let
|
2024-02-26 06:05:23 +01:00
|
|
|
inherit (lib.modules) mkIf;
|
2024-02-17 14:13:52 +01:00
|
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
2024-10-09 19:50:34 +02:00
|
|
|
inherit (lib.nvim.lua) toLuaObject;
|
2023-11-07 01:50:27 +01:00
|
|
|
|
2024-10-09 19:50:34 +02:00
|
|
|
cfg = config.vim.autopairs.nvim-autopairs;
|
2023-02-27 15:53:34 +01:00
|
|
|
in {
|
2024-02-26 06:05:23 +01:00
|
|
|
config = mkIf cfg.enable {
|
2024-10-09 19:50:34 +02:00
|
|
|
vim = {
|
|
|
|
startPlugins = ["nvim-autopairs"];
|
|
|
|
pluginRC.autopairs = entryAnywhere ''
|
|
|
|
require('nvim-autopairs').setup(${toLuaObject cfg.setupOpts})
|
|
|
|
'';
|
|
|
|
};
|
2024-02-26 06:05:23 +01:00
|
|
|
};
|
2023-02-27 15:53:34 +01:00
|
|
|
}
|