experimenting

This commit is contained in:
mewoocat 2025-12-21 06:31:30 -06:00
commit f4072b710a

View file

@ -106,6 +106,12 @@ in {
inherit defaultDiagnosticsProvider; inherit defaultDiagnosticsProvider;
}; };
}; };
indentSize = mkOption {
description = "Sets the indent size in spaces for .nix files";
type = int;
default = 2;
};
}; };
config = mkIf cfg.enable (mkMerge [ config = mkIf cfg.enable (mkMerge [
@ -160,5 +166,26 @@ in {
cfg.extraDiagnostics.types); cfg.extraDiagnostics.types);
}; };
}) })
]);
vim = {
autocmds = [
{
desc = "Sets indent for nix files";
event = ["BufEnter"];
pattern = [
"*.nix"
"*.md"
];
callback = lib.generators.mkLuaInline ''
function()
vim.opt.tabstop = ${cfg.indentSize}
vim.opt.softtabstop = ${cfg.indentSize}
vim.opt.shiftwidth = ${cfg.indentSize}
end
'';
once = true;
}
];
}
])
} }