config/modules/neovim/options.nix
chloe caruso 71b0ce756a 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
2025-07-22 15:58:35 -07:00

26 lines
541 B
Nix

{ ... }:
{
config.vim.options = {
# Indentation
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
showmode = false;
# Default to treesitter folding
foldenable = true;
foldmethod = "expr";
foldexpr = "v:lua.vim.treesitter.foldexpr()";
foldlevel = 99;
foldcolumn = "1";
foldlevelstart = 99;
# Case-insensitive find-in-file
ignorecase = true;
smartcase = true;
# Enable swapfile, but not in the same location as the source files.
undofile = true;
swapfile = true;
};
}