Skip to content

Commit

Permalink
[DEV] default stylua fmt + local .editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Icy-Thought committed Dec 16, 2024
1 parent c1b6448 commit 9148f0a
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions modules/develop/lua.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,9 @@ in {
fennel.enable = mkEnableOption "Lisp-based Lua development";
};

config = mkIf cfg.enable (mkMerge [
{
user.packages = attrValues ({
inherit (pkgs) lua lua-language-server stylua;
} // optionalAttrs (cfg.fennel.enable) { inherit (pkgs) fennel fnlfmt; });
}

(mkIf config.modules.develop.xdg.enable {
create.configFile.stylua-conf = {
target = "stylua/stylua.toml";
source = let tomlFormat = pkgs.formats.toml { };
in tomlFormat.generate "stylua-conf" {
column_width = 80;
line_endings = "Unix";
indent_type = "Spaces";
indent_width = 4;
quote_style = "AutoPreferDouble";
call_parentheses = "Always";
};
};
})
]);
config = mkIf cfg.enable (mkMerge [{
user.packages = attrValues ({
inherit (pkgs) lua lua-language-server stylua;
} // optionalAttrs (cfg.fennel.enable) { inherit (pkgs) fennel fnlfmt; });
}]);
}

0 comments on commit 9148f0a

Please sign in to comment.