blob: 945fbf2ea15ecfd9b911d1ad8d9f29f765c03e68 (
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
|
{ config, lib, pkgs, ...}:
let
cfg = config.modules.neovim;
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
]))
blink-cmp
nvim-lspconfig
base16-nvim
telescope-nvim
telescope-fzf-native-nvim
];
extraLuaConfig = ''
${builtins.readFile ./nvim/init.lua}
'';
};
};
}
|