feat!: do not format by default

This commit is contained in:
Moritz Böhme 2023-10-27 17:38:49 +02:00
parent 1dc6361600
commit 408ab5cad3
Signed by: moritz
GPG key ID: 970C6E89EB0547A9

View file

@ -54,17 +54,19 @@ let
require("lazy").setup(${lazySpecs})
'';
lazy =
formatted =
pkgs.runCommand "lazy.lua" { inherit text; } ''
touch $out
echo -n "$text" > $out
${getExe pkgs.stylua} $out
'';
lazy = if cfg.format then readFile formatted else text;
in
{
options.programs.neovim.lazy = {
enable = mkEnableOption "lazy.nvim";
format = mkEnableOption "format";
plugins = mkOption
{
default = [ ];
@ -219,7 +221,7 @@ in
config = mkIf cfg.enable {
programs.neovim = {
extraLuaConfig = readFile lazy;
extraLuaConfig = lazy;
extraPython3Packages = ps:
let
plugins = map (getAttr "plugin") cfg.plugins;