about summary refs log tree commit diff stats
path: root/hm/soispha/conf/nvim/plgs/flatten-nvim/default.nix
blob: 4fc009aeef50c01c32d6459f2c9714b99cd8647d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
  pkgs,
  lib,
  ...
}: {
  programs.nixvim = {
    # TODO: package flatten-nvim though a module

    extraConfigLuaPre = ''
      ${lib.strings.fileContents ./lua/flatten-nvim.lua}
      if os.getenv("NVIM") ~= nil then
        -- Avoid loading plugins because the host will take control of the instance anyways
        return
      end
    '';
    extraPlugins = [
      pkgs.vimExtraPlugins.flatten-nvim
    ];
  };
}