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
This commit is contained in:
parent
20087783d3
commit
71b0ce756a
2 changed files with 32 additions and 19 deletions
|
@ -5,6 +5,7 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
# based on default options from upstream:
|
||||
# https://github.com/NotAShelf/nvf/blob/main/configuration.nix
|
||||
#
|
||||
|
@ -18,23 +19,6 @@
|
|||
enable = true;
|
||||
};
|
||||
|
||||
options = {
|
||||
tabstop = 2;
|
||||
softtabstop = 2;
|
||||
shiftwidth = 2;
|
||||
undofile = true;
|
||||
swapfile = false;
|
||||
showmode = false;
|
||||
foldlevel = 99;
|
||||
foldcolumn = "1";
|
||||
foldlevelstart = 99;
|
||||
foldenable = true;
|
||||
foldmethod = "expr";
|
||||
#Default to treesitter folding
|
||||
foldexpr = "v:lua.vim.treesitter.foldexpr()";
|
||||
};
|
||||
|
||||
|
||||
visuals = {
|
||||
# notification system
|
||||
# https://github.com/j-hui/fidget.nvim
|
||||
|
@ -110,7 +94,6 @@
|
|||
css.enable = true;
|
||||
html.enable = true;
|
||||
markdown.enable = true;
|
||||
nix.enable = true;
|
||||
python.enable = true;
|
||||
rust.crates.enable = true;
|
||||
rust.enable = true;
|
||||
|
@ -120,7 +103,11 @@
|
|||
# sort-lines: off
|
||||
|
||||
ts.format.enable = false; # deno fmt is enabled elsewhere
|
||||
nix.format.type = "nixfmt"; # looks so much nicer
|
||||
nix = {
|
||||
enable = true;
|
||||
format.type = "nixfmt"; # looks so much nicer
|
||||
lsp.options.autoArchive = true;
|
||||
};
|
||||
};
|
||||
formatter.conform-nvim = {
|
||||
enable = true;
|
||||
|
|
26
modules/neovim/options.nix
Normal file
26
modules/neovim/options.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ ... }:
|
||||
{
|
||||
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;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue