mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 03:08:27 +00:00
build: move all generator scripts to src/gen/
- Move all generator Lua scripts to the `src/gen/` - Add a `.luarc.json` to `src/gen/` - Add a `preload.lua` to `src/gen/` - Add `src` to `package.path` so it aligns with `.luarc.json' - Fix all `require` statements in `src/gen/` so they are consistent: - `require('scripts.foo')` -> `require('gen.foo')` - `require('src.nvim.options')` -> `require('nvim.options')` - `require('api.dispatch_deprecated')` -> `require('nvim.api.dispatch_deprecated')`
This commit is contained in:

committed by
Lewis Russell

parent
85caaa70d4
commit
0f24b0826a
17
src/gen/preload_nlua.lua
Normal file
17
src/gen/preload_nlua.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
local srcdir = table.remove(arg, 1)
|
||||
local nlualib = table.remove(arg, 1)
|
||||
local gendir = table.remove(arg, 1)
|
||||
|
||||
package.path = (srcdir .. '/src/?.lua;')
|
||||
.. (srcdir .. '/runtime/lua/?.lua;')
|
||||
.. (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])()
|
Reference in New Issue
Block a user