diff --git a/lua/rocks/luarocks.lua b/lua/rocks/luarocks.lua index dcd066de..378d51cb 100644 --- a/lua/rocks/luarocks.lua +++ b/lua/rocks/luarocks.lua @@ -54,6 +54,9 @@ luarocks.cli = function(args, on_exit, opts) lock.wait() lock = nio.control.future() end + opts.env = vim.tbl_deep_extend("force", opts.env or {}, { + LUAROCKS_CONFIG = "", + }) local luarocks_cmd = vim.list_extend({ config.luarocks_binary, "--lua-version=" .. constants.LUA_VERSION, diff --git a/nix/plugin-overlay.nix b/nix/plugin-overlay.nix index 0f2fa7df..00b1c82d 100644 --- a/nix/plugin-overlay.nix +++ b/nix/plugin-overlay.nix @@ -201,10 +201,6 @@ in { package.cpath = package.cpath .. ";" .. table.concat(luarocks_cpath, ";") vim.opt.runtimepath:append(vim.fs.joinpath("${rocks}", "rocks.nvim-scm-1-rocks", "rocks.nvim", "*")) - - --- FIXME: nix somehow propagates the LUAROCKS_CONFIG used to build rocks.nvim to neovim - --- See https://github.com/nvim-neorocks/rocks.nvim/issues/148 - vim.fn.setenv("LUAROCKS_CONFIG", "") ''; wrapRc = true; wrapperArgs =