nix-config/modules/home-manager/nvim/options.nix

73 lines
1.8 KiB
Nix
Raw Normal View History

2024-03-24 23:39:49 +01:00
{
config,
2024-03-24 23:39:49 +01:00
pkgs,
lib,
...
}: {
config = lib.mkIf config.user.nvim.enable {
programs.nixvim = {
opts = {
mouse = "a";
lazyredraw = true;
termguicolors = true;
autoread = true;
swapfile = false;
history = 500;
formatoptions = "rojq";
# dont hard wrap
textwidth = 0;
wrapmargin = 0;
breakindent = true;
# highlight after col
colorcolumn = "80,100,120";
# add ruler to side of screen
number = true;
numberwidth = 3;
#display cursor cordinates
ruler = true;
#always leave 5 cells between cursor and side of window
scrolloff = 5;
# better command line completion
wildmenu = true;
# ignore case if all lowercase
ignorecase = true;
smartcase = true;
# show unfinished keycombos in statusbar
showcmd = true;
# regex stuff
magic = true;
# always show statusline
laststatus = 2;
# tab stuff
tabstop = 4;
shiftwidth = 0;
autoindent = true;
smartindent = true;
smarttab = true;
# for true tabs, change to false
expandtab = true;
softtabstop = -1;
# highlight search results as you type
hlsearch = true;
incsearch = true;
# folding stuff
foldlevelstart = 5;
foldmethod = lib.mkDefault "indent";
foldcolumn = "auto:4";
foldenable = true;
# display whitespace as other chars
list = true;
listchars = {
tab = ">-";
eol = "";
nbsp = "";
trail = "";
extends = "";
precedes = "";
};
showbreak = "";
2024-03-24 23:39:49 +01:00
};
};
};
}