nvf/modules/plugins/autopairs/nvim-autopairs/config.nix

19 lines
393 B
Nix
Raw Normal View History

{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
2024-02-17 14:13:52 +01:00
inherit (lib.nvim.dag) entryAnywhere;
2024-10-06 12:42:35 +02:00
inherit (lib.nvim.lua) toLuaObject;
2024-10-06 12:42:35 +02:00
cfg = config.vim.autopairs.nvim-autopairs;
in {
config = mkIf cfg.enable {
2024-10-06 12:42:35 +02:00
vim = {
startPlugins = ["nvim-autopairs"];
pluginRC.autopairs = entryAnywhere "require('nvim-autopairs').setup(${toLuaObject cfg.setupOpts})";
};
};
}