authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-07-22 15:58:35-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-07-22 15:58:35-07:00
log71b0ce756a8d96ba765e7fbb776f70ae03d5690a
tree0b175ad434a265fec43ec1f4763c2a183c03a419
parent20087783d335db34d010b4ae9dc48054a4391f8e

nix: fix default opts not applying

previously mkDefault/mkOverride on vim.options would go before nvf's defaults, which would basically make none of them apply. now it doesn't use an override priority, at the cost that overriding any of these in a user config will not work without mkForce. also enable swapfiles, closes #1

2 files changed, 32 insertions(+), 19 deletions(-)

modules/neovim/default.nix+6-19
......@@ -5,6 +5,7 @@
55 ...
66}:
77{
8 imports = [ ./options.nix ];
89 # based on default options from upstream:
910 # https://github.com/NotAShelf/nvf/blob/main/configuration.nix
1011 #
......@@ -18,23 +19,6 @@
1819 enable = true;
1920 };
2021
21 options = {
22 tabstop = 2;
23 softtabstop = 2;
24 shiftwidth = 2;
25 undofile = true;
26 swapfile = false;
27 showmode = false;
28 foldlevel = 99;
29 foldcolumn = "1";
30 foldlevelstart = 99;
31 foldenable = true;
32 foldmethod = "expr";
33 #Default to treesitter folding
34 foldexpr = "v:lua.vim.treesitter.foldexpr()";
35 };
36
37
3822 visuals = {
3923 # notification system
4024 # https://github.com/j-hui/fidget.nvim
......@@ -110,7 +94,6 @@
11094 css.enable = true;
11195 html.enable = true;
11296 markdown.enable = true;
113 nix.enable = true;
11497 python.enable = true;
11598 rust.crates.enable = true;
11699 rust.enable = true;
......@@ -120,7 +103,11 @@
120103 # sort-lines: off
121104
122105 ts.format.enable = false; # deno fmt is enabled elsewhere
123 nix.format.type = "nixfmt"; # looks so much nicer
106 nix = {
107 enable = true;
108 format.type = "nixfmt"; # looks so much nicer
109 lsp.options.autoArchive = true;
110 };
124111 };
125112 formatter.conform-nvim = {
126113 enable = true;
modules/neovim/options.nix created+26
......@@ -0,0 +1,26 @@
1{ ... }:
2{
3 config.vim.options = {
4 # Indentation
5 tabstop = 2;
6 softtabstop = 2;
7 shiftwidth = 2;
8 showmode = false;
9
10 # Default to treesitter folding
11 foldenable = true;
12 foldmethod = "expr";
13 foldexpr = "v:lua.vim.treesitter.foldexpr()";
14 foldlevel = 99;
15 foldcolumn = "1";
16 foldlevelstart = 99;
17
18 # Case-insensitive find-in-file
19 ignorecase = true;
20 smartcase = true;
21
22 # Enable swapfile, but not in the same location as the source files.
23 undofile = true;
24 swapfile = true;
25 };
26}