-
Notifications
You must be signed in to change notification settings - Fork 1
/
example-config.nix
62 lines (62 loc) · 1.33 KB
/
example-config.nix
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
{
pkgs,
lib,
nix2nvimrc,
...
}:
let
parsers = lib.mapAttrs' (
n: v: lib.nameValuePair (lib.removePrefix "tree-sitter-" n) "${v}/parser"
) pkgs.tree-sitter.builtGrammars;
in
{
configs = {
treesitter = {
treesitter.parsers = {
inherit (parsers) nix;
};
plugins = [ pkgs.vimPlugins.nvim-treesitter ];
setup.modulePath = "nvim-treesitter.configs";
setup.args.highlight.enable = true;
};
telescope = {
plugins = with pkgs.vimPlugins; [
telescope-nvim
plenary-nvim
popup-nvim
];
setup.args = { };
keymaps = map (nix2nvimrc.toKeymap { silent = true; }) [
[
[
"n"
"v"
]
"<Leader>y"
"\"+y"
{ }
]
[
"n"
"<space>ff"
"<Cmd>Telescope find_files<CR>"
{ }
]
[
"n"
"<space>fg"
(nix2nvimrc.luaExpr "require'telescope.builtin'.live_grep")
{ }
]
];
};
lspconfig = {
after = [ "telescope" ];
plugins = [ pkgs.vimPlugins.nvim-lspconfig ];
lspconfig.servers.nixd.config.cmd = [ "${pkgs.nixd}/bin/nixd" ];
vim = [ ./test/init.vim ];
};
empty = { };
plugin_only.plugins = [ pkgs.vimPlugins.vim-speeddating ];
};
}