feat: move nixvim out

This commit is contained in:
Kat Inskip 2025-12-02 01:01:36 -08:00
parent 4477a98282
commit 57815057f6
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
11 changed files with 329 additions and 109 deletions

View file

@ -1,109 +1,20 @@
{
lib,
tree,
std,
...
}: let
inherit (std) set;
inherit (lib.attrsets) genAttrs;
stdarg = _: {
_module.args = {
inherit std;
};
};
in {
programs.nixvim = {
enable = true;
defaultEditor = true;
imports = [
tree.home.profiles.nixvim.plugins
stdarg
tree.nixvim
];
vimAlias = true;
opts = {
mouse = "a";
clipboard = "unnamedplus";
completeopt = "longest,menuone";
backup = false;
writebackup = false;
ttimeoutlen = 100;
number = true;
relativenumber = true;
showmatch = true;
foldmethod = "marker";
colorcolumn = "80";
splitright = true;
splitbelow = true;
ignorecase = true;
smartcase = true;
wrap = true;
linebreak = true;
showbreak = "";
termguicolors = true;
laststatus = 3;
cursorline = true;
cmdheight = 1;
hlsearch = true;
expandtab = true;
shiftwidth = 2;
tabstop = 2;
smartindent = true;
list = true;
listchars = {
tab = "» ";
extends = "";
precedes = "";
nbsp = "·";
trail = "";
};
hidden = true;
history = 1000;
shada = "'1000,f1,<500,@500,/500";
lazyredraw = true;
synmaxcol = 240;
updatetime = 700;
};
globals = {
mapleader = " ";
maplocalleader = ",";
};
plugins = let
pluginsToGen = [
"lastplace"
"commentary"
"treesitter"
"treesitter-context"
"nix-develop"
"lualine"
"startup"
"lazygit"
"web-devicons"
"auto-session"
"overseer"
"twilight"
"bufferline"
"zk"
"rainbow"
];
basePlugin = {
enable = true;
autoLoad = true;
};
in
set.merge [
(genAttrs pluginsToGen (_: basePlugin))
{
auto-session.settings = {
auto_save = true;
auto_create = true;
bypass_save_filetypes = ["startup"];
close_filetypes_on_save = ["startup"];
};
twilight.settings = {
context = 10;
dimming.alpha = 0.5;
expand = [
"function"
"method"
"table"
"if_statement"
];
};
}
];
};
}