summaryrefslogtreecommitdiffstats
path: root/modules/plugins/mini/operators/config.nix
blob: bb374377f35644c3260dccc8112b141e86f9e4c6 (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.operators;
in {
  vim = mkIf cfg.enable {
    startPlugins = ["mini-operators"];

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