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

  cfg = config.vim.dashboard.dashboard-nvim;
in {
  config = mkIf cfg.enable {
    vim = {
      startPlugins = ["dashboard-nvim"];

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