diff --git a/modules/programs/nvim/default.nix b/modules/programs/nvim/default.nix index f126481..3503476 100644 --- a/modules/programs/nvim/default.nix +++ b/modules/programs/nvim/default.nix @@ -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;