summaryrefslogtreecommitdiffstats
path: root/modules/plugins/ui/ui2/config.nix
blob: 52676b43381578a1b7d2919404078ffba83ecbd2 (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.ui.ui2;
in {
  config = mkIf cfg.enable {
    vim = {
      luaConfigRC.ui2 = entryAnywhere ''
        require('vim._core.ui2').enable(${toLuaObject (cfg.setupOpts // {enable = lib.mkForce true;})})
      '';
    };
  };
}