feat(nvim): format init.lua

This commit is contained in:
Moritz Böhme 2023-08-10 18:40:41 +02:00
parent c8f53dfe2e
commit 3180e64085
Signed by: moritz
GPG key ID: 970C6E89EB0547A9

View file

@ -63,9 +63,7 @@ let
);
lazySpecs = listToStringMultiLine id (map lazySpecFromPlugin cfg.plugins);
lazy = ''
require("lazy").setup({
${lazySpecs}
})
require("lazy").setup(${lazySpecs})
'';
in
{
@ -213,7 +211,17 @@ in
else neovide
)
];
xdg.configFile."nvim/init.lua" = {
source =
let
text = lib.concatLines [ (builtins.readFile ./options.lua) lazy ];
in
pkgs.runCommand "init.lua" { inherit text; } ''
touch $out
echo -n "$text" > $out
${getExe pkgs.stylua} $out
'';
};
programs.neovim = {
enable = true;
package = pkgs.neovim-nightly;
@ -221,7 +229,6 @@ in
vimdiffAlias = true;
withNodeJs = true;
withPython3 = true;
extraLuaConfig = lib.concatLines [ (builtins.readFile ./options.lua) lazy ];
extraPython3Packages = ps:
let
plugins = map (getAttr "plugin") cfg.plugins;