aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/generators/preload.lua
blob: 721d2880b8fcc3b358868a59a5b3f2d74ef1bf7d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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])()