blob: e09866dba724b3db97783e57d21e5e4b7af68f8f (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
{ config, lib, pkgs, ...}:
let
cfg = config.modules.neovim;
scheme = config.modules.scheme;
in
{
options.modules.neovim = {
enable = lib.mkEnableOption "neovim";
};
config = lib.mkIf cfg.enable {
xdg.configFile."nvim/lua" = {
source = ./nvim/lua;
recursive = true;
};
xdg.configFile."nvim/after" = {
source = ./nvim/after;
recursive = true;
};
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
plugins = with pkgs.vimPlugins; [
(nvim-treesitter.withPlugins (p: with p; [
tree-sitter-nix
tree-sitter-c
tree-sitter-cpp
tree-sitter-lua
tree-sitter-zig
tree-sitter-rust
tree-sitter-toml
tree-sitter-markdown
tree-sitter-markdown-inline
]))
{
plugin = lean-nvim;
config = ''
require('lean').setup{ mappings = true }
'';
type = "lua";
}
plenary-nvim
nvim-lspconfig
base16-nvim
telescope-nvim
telescope-fzf-native-nvim
vim-obsession
];
# extraLuaPackages = ps: with ps; [
# ];
extraLuaConfig = ''
vim.cmd[[colorscheme ${scheme.name}]]
${builtins.readFile ./nvim/init.lua}
vim.cmd[[${scheme.extraVimConfig}]]
vim.cmd[[
hi StatusLineNC guibg=none guifg=#4c4c4c
hi StatusLine guibg=none guifg=#8f8aac
]]
'';
};
};
}
|