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

  cfg = config.vim.ui.modes-nvim;
in {
  config = mkIf cfg.enable {
    vim = {
      startPlugins = ["modes-nvim"];
      pluginRC.modes-nvim = entryAnywhere ''
        require('modes').setup(${toLuaObject cfg.setupOpts})
      '';
    };
  };
}