Files
neovim/src/nvim/generators/preload.lua
bfredl ffaf74f147 fix(build): distinguish vim.mpack from global require'mpack'
problem: the api of vim.mpack is not compatible with a system provided mpack
solution: don't require 'mpack' directly from the system path
2023-04-20 19:00:38 +02:00

11 lines
357 B
Lua

local srcdir = table.remove(arg, 1)
local nlualib = table.remove(arg, 1)
package.path = srcdir .. '/src/nvim/?.lua;' ..srcdir .. '/runtime/lua/?.lua;' .. package.path
_G.vim = require'vim.shared'
_G.vim.inspect = require 'vim.inspect'
package.cpath = package.cpath .. ';' .. nlualib
require 'nlua0'
arg[0] = table.remove(arg, 1)
return loadfile(arg[0])()