summaryrefslogtreecommitdiffstats
path: root/modules/plugins/mini/ai/config.nix
blob: 7385e1b1e583ee150c3feaf0fd436e953092fe6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
  config,
  lib,
  ...
}: let
  inherit (lib.modules) mkIf;
  inherit (lib.nvim.dag) entryAnywhere;
  inherit (lib.nvim.lua) toLuaObject;

  cfg = config.vim.mini.ai;
in {
  vim = mkIf cfg.enable {
    startPlugins = ["mini-ai"];

    pluginRC.mini-ai = entryAnywhere ''
      require("mini.ai").setup(${toLuaObject cfg.setupOpts})
    '';
  };
}