working example

This commit is contained in:
mewoocat 2025-12-22 14:28:43 -06:00
commit 95f36449a7
2 changed files with 12 additions and 7 deletions

View file

@ -4,12 +4,13 @@
lib,
...
}: let
inherit (builtins) attrNames;
inherit (builtins) attrNames toString;
inherit (lib) concatStringsSep;
inherit (lib.meta) getExe;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.types) enum;
inherit (lib.types) int;
inherit (lib.nvim.types) mkGrammarOption diagnostics deprecatedSingleOrListOf;
inherit (lib.nvim.attrsets) mapListToAttrs;
@ -167,8 +168,8 @@ in {
};
})
vim = {
autocmds = [
{
vim.autocmds = [
{
desc = "Sets indent for nix files";
event = ["BufEnter"];
@ -178,14 +179,15 @@ in {
];
callback = lib.generators.mkLuaInline ''
function()
vim.opt.tabstop = ${cfg.indentSize}
vim.opt.softtabstop = ${cfg.indentSize}
vim.opt.shiftwidth = ${cfg.indentSize}
vim.opt.tabstop = ${toString cfg.indentSize}
vim.opt.softtabstop = ${toString cfg.indentSize}
vim.opt.shiftwidth = ${toString cfg.indentSize}
end
'';
once = true;
}
];
}
])
]);
}