mirror of
https://github.com/neovim/neovim.git
synced 2026-08-22 15:21:08 +00:00
Then we can just load metadata in C as a single msgpack blob. Which also can be used directly as binarly data, instead of first unpacking all the functions and ui_events metadata to immediately pack it again, which was a bit of a silly walk (and one extra usecase of `msgpack_rpc_from_object` which will get yak shaved in the next PR)
14 lines
484 B
Lua
14 lines
484 B
Lua
local srcdir = table.remove(arg, 1)
|
|
local nlualib = table.remove(arg, 1)
|
|
local gendir = table.remove(arg, 1)
|
|
package.path = srcdir .. '/src/nvim/?.lua;' .. srcdir .. '/runtime/lua/?.lua;' .. package.path
|
|
package.path = gendir .. '/?.lua;' .. package.path
|
|
_G.vim = require 'vim.shared'
|
|
_G.vim.inspect = require 'vim.inspect'
|
|
package.cpath = package.cpath .. ';' .. nlualib
|
|
require 'nlua0'
|
|
vim.NIL = vim.mpack.NIL -- WOW BOB WOW
|
|
|
|
arg[0] = table.remove(arg, 1)
|
|
return loadfile(arg[0])()
|