summaryrefslogtreecommitdiffstats
path: root/modules/plugins/utility/snacks-nvim/config.nix
blob: e726e3e2f64124572f5a134c71142ff7930af284 (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.lua) toLuaObject;
  inherit (lib.nvim.dag) entryAnywhere;

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