From 24df1ab44ac69266e1728cd7d92a0fa244c6c020 Mon Sep 17 00:00:00 2001 From: polyfloyd Date: Fri, 23 May 2025 22:44:54 +0200 Subject: [PATCH] neovim: Make it possible to configure using Lua --- nixos/modules/programs/neovim.nix | 5 ++++- pkgs/applications/editors/neovim/utils.nix | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/modules/programs/neovim.nix b/nixos/modules/programs/neovim.nix index 9a3e47fb11d6..ce549b14ef7a 100644 --- a/nixos/modules/programs/neovim.nix +++ b/nixos/modules/programs/neovim.nix @@ -73,7 +73,10 @@ in example = lib.literalExpression '' { customRC = ''' - " here your custom configuration goes! + " here your custom VimScript configuration goes! + '''; + customLuaRC = ''' + -- here your custom Lua configuration goes! '''; packages.myVimPackage = with pkgs.vimPlugins; { # loaded on launch diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix index 490753ebb840..d008ba2c76d7 100644 --- a/pkgs/applications/editors/neovim/utils.nix +++ b/pkgs/applications/editors/neovim/utils.nix @@ -73,6 +73,7 @@ let makeNeovimConfig = { customRC ? "", + customLuaRC ? "", # the function you would have passed to lua.withPackages extraLuaPackages ? (_: [ ]), ... @@ -83,6 +84,7 @@ let attrs // { neovimRcContent = customRC; + luaRcContent = customLuaRC; wrapperArgs = lib.optionals (luaEnv != null) [ "--prefix" "LUA_PATH" @@ -145,6 +147,7 @@ let vimAlias ; customRC = configure.customRC or ""; + customLuaRC = configure.customLuaRC or ""; inherit plugins; inherit extraName; };