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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
|
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
nvf.url = "github:notashelf/nvf";
};
outputs = { self, nixpkgs, ...} @ inputs: let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in {
packages.x86_64-linux = {
# Set the default package to the wrapped instance of Neovim.
# This will allow running your Neovim configuration with
# `nix run` and in addition, sharing your configuration with
# other users in case your repository is public.
default =
(inputs.nvf.lib.neovimConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
{
config.vim = {
# ┌───────┐
# │ Theme │
# └───────┘
highlight = {
CursorLineNr.fg="lightblue";
CursorLine.bg="#0a0a0a";
ColorColumn.bg="#0a0a0a";
Normal.bg=null; # Transparent nvim background
IlluminatedWordRead.fg="#E06C75"; # Illuminate
};
theme = {
#enable = true;
#name = "base16";
#base16-colors = {
# base00 = "#000000";
# base01 = "#131721";
# base02 = "#272d38";
# base03 = "#3e4b59";
# base04 = "#bfbdb6";
# base05 = "#e6e1cf";
# base06 = "#e6e1cf";
# base07 = "#f3f4f5";
# base08 = "#f07178";
# base09 = "#ff8f40";
# base0A = "#ffb454";
# base0B = "#b8cc52";
# base0C = "#95e6cb";
# base0D = "#59c2ff";
# base0E = "#d2a6ff";
# base0F = "#e6b673";
#};
};
# ┌─────────┐
# │ Plugins │
# └─────────┘
# Install plugins that aren't bundled with nvf
extraPlugins = {
smear-cursor = {
package = pkgs.vimPlugins.smear-cursor-nvim;
setup =
''
require('smear_cursor').setup {
smear_to_cmd = false;
}
'';
};
vim-better-whitespace = {
package = pkgs.vimPlugins.vim-better-whitespace;
setup =
''
vim.g.better_whitespace_filetypes_blacklist = { 'dashboard' } -- Don't show whitespace error on dashboard
'';
};
barbar-nvim = { # Intuative tabs for open file buffers
package = pkgs.vimPlugins.barbar-nvim;
};
#semshi = {
# package = pkgs.vimPlugins.semshi;
# setup = ":UpdateRemotePlugins";
#};
};
# withPython3 = true; # Needed for semshi python improved python highlighting
# python3Packages = [ "pynvim" ]; # Needed for semshi python improved python highlighting
filetree.neo-tree = { # File tree for the side
enable = true;
setupOpts = {
reveal_force_cwd = true;
enable_cursor_hijack = true;
};
};
#mini.statusline.enable = true; # Bottom status line
statusline.lualine = { # Bottom status line
enable = true;
theme = "powerline";
activeSection.b = [ # Most of this segment is NVF default, except path
''
{
"filetype",
colored = true,
icon_only = true,
icon = { align = 'left' }
}
''
''
{
"filename",
path = 3, -- Absolute path, with tilde as the home directory
symbols = {modified = ' ', readonly = ' '},
separator = {right = ''}
}
''
''
{
"",
draw_empty = true,
separator = { left = '', right = '' }
}
''
];
};
binds = {
whichKey.enable = true; # Shortcut hint pop-up
cheatsheet.enable = true; # A searchable cheatsheet, using Telescope
};
# projects.project-nvim.enable = true; # Search projects and cd to them automatically. Trigger: Space+fp
autocomplete.blink-cmp = { # Code completion pop up
enable = true;
setupOpts.completion.documentation = {
auto_show = true;
auto_show_delay_ms = 0;
};
};
ui = {
colorizer = { # Preview colors
enable = true;
#setupOpts.user_default_options.RRGGBB = true;
setupOpts = {
filetypes = {"*" = { };}; # Enable by default for all files
filetypes.user_default_options.RRGGBBAA = true;
};
};
#breadcrumbs.enable = true;
noice = { # Cooler notifications :Noice command to show a full message history
enable = true;
setupOpts = {
cmdline = {
view = "cmdline"; # Get a classic cmdline at the bottom
};
};
};
borders.enable = true;
illuminate.enable = true; # highlights all instances of word under cursor
};
# tabline.nvimBufferline = { # File tabs status bar for open file buffers
# enable = true;
# setupOpts = {
# options = {
# middle_mouse_command = "bd";
# numbers = "none";
# always_show_bufferline = false; # Don't show when only one buffer is open
# };
# highlights = {
# tab = {
# fg = "#aaaaaa";
# bg = null;
# };
# tab_selected = {
# fg = "#00ffff";
# bg = null;
# };
# };
# };
# };
visuals = {
rainbow-delimiters.enable = true;
indent-blankline = {
enable = true; # Lines that show code nesting indentation
setupOpts = {
# indent.tab_char = "⇥";
exclude = {
filetypes = [ "dashboard" ]; # Don't show indent on dashboard
};
};
};
nvim-scrollbar.enable = true; # File scrollbar on the right side
nvim-web-devicons.enable = true; # Needed for barbar aswell
};
telescope = {
enable = true; # Grep for code in directory
mappings = {
liveGrep = "<leader>/";
findFiles = "<leader>.";
};
};
git = {
gitsigns = { # Show changes since last git commit + more shortcuts.
enable = true; # Needed for barbar aswell
mappings.previewHunk = "<leader>g"; # Pop up, showing changes since last commit
};
};
dashboard.dashboard-nvim = {
enable = true;
setupOpts = {
theme = "hyper";
change_to_vcs_root = true;
preview = {
command = "cat ${self}/neovim_header | ${pkgs.lolcat}/bin/lolcat --animate --speed 100 --duration 10";
file_path = "${self}/neovim_header";
file_height = 11;
file_width = 71;
};
config = {
packages.enable = false; # Don't show how many plugins neovim loaded (It always says 0)
project.enable = true;
shortcut = [
{
desc = " Quit";
group = "@property";
action = "q";
key = "q";
}
{
desc = " New file";
group = "@property";
action = "enew";
key = "n";
}
];
header = [
" <U+E0BA><U+E0B8>"
" <U+E0BA>████<U+E0B8> <U+E0BA>██████<U+E0BC> <U+E0BE>█████<U+E0B8> <U+E0BE>██<U+E0BC>"
" <U+E0BA>██████<U+E0B8><U+E0BE>█████<U+E0BC> <U+E0BE>█████<U+E0B8> <U+E0B8>"
" <U+E0BA>███████<U+E0B8><U+E0BE>██<U+E0BC> <U+E0BA>████████<U+E0BC><U+E0BA>███<U+E0B8><U+E0BE>█████<U+E0B8>███ ███<U+E0B8> <U+E0BA>███<U+E0B8>████<U+E0B8>████<U+E0B8>"
" <U+E0BA>█<U+E0B8><U+E0BE>████████<U+E0BC> <U+E0BA>███<U+E0BC> <U+E0BA>█████<U+E0B8><U+E0BE>████████ █████ █████<U+E0BE>████<U+E0BE>█████"
" <U+E0BA>███<U+E0B8><U+E0BE>██████<U+E0BC> <U+E0BA>████████<U+E0BC><U+E0BA>██<U+E0BC> <U+E0BE>██<U+E0B8><U+E0BE>███████ █████ █████ ████ █████"
" <U+E0BA>██████<U+E0BC><U+E0BE>█████<U+E0BC> <U+E0BA>███<U+E0BC> <U+E0BA>███<U+E0B8> <U+E0BA>███<U+E0B8><U+E0BE>██████ █████ █████ ████ █████<U+E0B8>"
" <U+E0BA>██████<U+E0BC> <U+E0BE>███<U+E0BC><U+E0BA>█████████<U+E0B8><U+E0BE>█████████<U+E0BC> <U+E0BE>████<U+E0BC> █████ █████ ████ ██████<U+E0B8>"
];
};
};
};
terminal.toggleterm = {
enable = true; # Enable float, bottom, side and tab terminal
lazygit = {
enable = true;
};
};
# ┌─────────┐
# │ Options │
# └─────────┘
options = {
tabstop = 2; # Number of spaces that a <Tab> in the file counts for. Also see the :retab command, and the softtabstop option.
shiftwidth = 2; # Number of spaces to use for each step of (auto)indent. Used for cindent, >>, <<, etc.
scrolloff = 8; # Scroll 8 lines before cursor is a the bottom
colorcolumn = "120"; # Color the 120'th column slightly gray
cursorlineopt = "both"; # Highlight the text line of the cursor with CursorLine hl-CursorLine
wrap = false; # Don't wrap long line
cursorline = true; # Highlight current line background & line number
list = true;
listchars = "tab:⇥·,trail:␠,nbsp:⎵"; # eol:⏎,,space:␣"; # Show hidden chars with list
};
# ┌─────┐
# │ LSP │
# └─────┘
lsp = {
enable = true;
trouble.enable = true; # Side menu with LSP errors showing problem under cursor. Trigger: Space+ld
otter-nvim.enable = true;
nvim-docs-view.enable = true;
mappings = {
goToDefinition = "<leader>lgd";
};
};
debugger = {
nvim-dap = { # Live code runner and debug tool
enable = true;
ui.enable = true;
};
};
languages = {
nix.enable = true;
python.enable = true;
html.enable = true;
css.enable = true;
clang.enable = true; # Enable C/C++ language support.
bash.enable = true;
markdown.enable = true;
rust.enable = true;
sql.enable = true;
ts.enable = true; # Enable Typescript/Javascript language support.
wgsl.enable = true; # Enable WebGPU language support.
yaml.enable = true;
# enableTreesitter = true; # Improved code highlighting
# /\ Treesitter disbled because it breaks V-Block insert
markdown.extensions.markview-nvim = {
enable = true; # Markdown preview
setupOpts = {
preview = {
enable_hybrid_mode = true;
hybrid_modes = [ "n" ];
};
};
};
};
# treesitter.context = {
# enable =true;
# setupOpts = {
# # max_lines = 1;
# separator = null;
# mode = "topline";
# };
# };
# minimap = {
# minimap-vim.enable = false;
# codewindow.enable = true; # lighter, faster, and uses lua for configuration
# };
utility = {
preview.markdownPreview.enable = true;
undotree.enable = true;
diffview-nvim.enable = true;
};
# ┌────────────────────┐
# │ Custom keybindings │
# └────────────────────┘
keymaps = [
{
key = "<leader>t";
mode = ["n"];
action = ":Neotree toggle dir=./<CR>";
desc = "Show file manager";
}
{
key = "<C-Tab>";
mode = ["n"];
action = ":bnext<CR>";
desc = "Switch to next open file buffer";
}
{
key = "<C-S-Tab>";
mode = ["n"];
action = ":bprevious<CR>";
desc = "Switch to previous open file buffer";
}
];
extraLuaFiles = [
./lua.lua
];
};
}
];
})
.neovim;
};
};
}
|