blob: 80e249845c0048e4381d483cc6c3a12eef0bfeed (
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
{ config, lib, pkgs, ...}:
let
cfg = config.modules.neovim;
scheme = config.modules.scheme;
fromGitHub = ref: repo: pkgs.vimUtils.buildVimPlugin {
pname = "${lib.strings.sanitizeDerivationName repo}";
version = ref;
src = builtins.fetchGit {
url = "https://github.com/${repo}.git";
ref = ref;
};
doCheck = false;
};
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;
};
xdg.configFile."nvim/colors" = {
source = ./nvim/colors;
recursive = true;
};
# home.sessionVariables.MANPAGER = "nvim +Man!";
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = false;
vimAlias = false;
vimdiffAlias = true;
plugins = with pkgs.vimPlugins; [
nvim-treesitter
# nvim-treesitter.withAllGrammars
(nvim-treesitter.withPlugins (p: with p; [
tree-sitter-nix
tree-sitter-make
tree-sitter-cmake
tree-sitter-verilog
tree-sitter-scheme
tree-sitter-llvm
tree-sitter-html
tree-sitter-glsl
tree-sitter-devicetree
tree-sitter-cuda
tree-sitter-c
tree-sitter-cpp
tree-sitter-lua
tree-sitter-zig
tree-sitter-rust
tree-sitter-haskell
tree-sitter-toml
tree-sitter-markdown
tree-sitter-markdown-inline
tree-sitter-tablegen
]))
{
plugin = lean-nvim;
config =
# lua
''
require('lean').setup{ mappings = true }
'';
type = "lua";
}
plenary-nvim
mini-icons
oil-nvim
tmux-nvim
# noice-nvim
nvim-lspconfig
# blink-cmp
# tinted-vim
base16-nvim
telescope-nvim
telescope-fzf-native-nvim
# fzf-lua
# https://github.com/ibhagwan/fzf-lua/commit/26095d98c2969730457bf5b483919280e2cfb8bb
# (fromGitHub "HEAD" "ibhagwan/fzf-lua")
# fzf-lua.overrideAttrs (finalAttrs: previousAttrs: {
# previousAttrs.doCheck = false;
# })
vim-obsession
(pkgs.neovimUtils.buildNeovimPlugin {
luaAttr = pkgs.luaPackages.fzf-lua;
doCheck = false;
})
];
# extraLuaPackages = ps: with ps; [
# ];
extraLuaConfig =
''
${builtins.readFile ./nvim/init.lua}
vim.cmd[[${scheme.extraVimConfig}]]
vim.cmd[[colorscheme ${scheme.name}]]
'';
};
};
}
|