aboutsummaryrefslogtreecommitdiffstats
path: root/nvim/default.nix
blob: bf5b050abc694391fc88e0ea01b10d98d4f16ac0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ pkgs, config, ... }:

{
	programs.neovim.enable = true;
	programs.neovim.viAlias = true;
	programs.neovim.vimAlias = true;
	programs.neovim.vimdiffAlias = true;

	programs.neovim.extraLuaConfig =
''
${builtins.readFile ./options.lua}
${builtins.readFile ./keybindings.lua}
'';

	programs.neovim.plugins =
	with pkgs.vimPlugins;
	let
		toLua = str: "lua << EOF\n${str}\nEOF\n";
		toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
	in [
		{
			plugin = comment-nvim;
			config = toLuaFile ./plugins/comment.lua;
		}

		{
			plugin = lualine-nvim;
			config = toLuaFile ./plugins/lualine.lua;
		}

		{
			plugin = base16-nvim;
			config = toLua (import ./plugins/base16.nix config);
		}

		nvim-web-devicons

		{
			plugin = nvim-tree-lua;
			config = toLuaFile ./plugins/nvim-tree.lua;
		}
	];
}