mirror of
https://github.com/neovim/neovim.git
synced 2025-12-10 08:32:42 +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
@@ -6,6 +6,7 @@
|
||||
"workspace": {
|
||||
"library": [
|
||||
"../runtime/lua",
|
||||
"../src",
|
||||
"../build/usr/share/lua/5.1",
|
||||
"../build",
|
||||
"${3rd}/busted/library",
|
||||
|
||||
@@ -2,7 +2,7 @@ local t = require('test.testutil')
|
||||
|
||||
local eq = t.eq
|
||||
|
||||
local grammar = require('scripts/luacats_grammar')
|
||||
local grammar = require('gen.luacats_grammar')
|
||||
|
||||
describe('luacats grammar', function()
|
||||
--- @param text string
|
||||
|
||||
@@ -2,7 +2,7 @@ local t = require('test.testutil')
|
||||
|
||||
local eq = t.eq
|
||||
|
||||
local parser = require('scripts/luacats_parser')
|
||||
local parser = require('gen.luacats_parser')
|
||||
|
||||
--- @param name string
|
||||
--- @param text string
|
||||
|
||||
@@ -11,7 +11,7 @@ local function md_to_vimdoc(text, start_indent, indent, text_width)
|
||||
start_indent = start_indent or 0
|
||||
indent = indent or 0
|
||||
text_width = text_width or 70
|
||||
local util = require('scripts/util')
|
||||
local util = require('src/gen/util')
|
||||
return util.md_to_vimdoc(table.concat(text, '\n'), start_indent, indent, text_width)
|
||||
]],
|
||||
text,
|
||||
|
||||
@@ -2,10 +2,8 @@ local platform = vim.uv.os_uname()
|
||||
local deps_install_dir = table.remove(_G.arg, 1)
|
||||
local subcommand = table.remove(_G.arg, 1)
|
||||
local suffix = (platform and platform.sysname:lower():find 'windows') and '.dll' or '.so'
|
||||
package.path = deps_install_dir
|
||||
.. '/share/lua/5.1/?.lua;'
|
||||
.. deps_install_dir
|
||||
.. '/share/lua/5.1/?/init.lua;'
|
||||
package.path = (deps_install_dir .. '/share/lua/5.1/?.lua;')
|
||||
.. (deps_install_dir .. '/share/lua/5.1/?/init.lua;')
|
||||
.. package.path
|
||||
package.cpath = deps_install_dir .. '/lib/lua/5.1/?' .. suffix .. ';' .. package.cpath
|
||||
|
||||
|
||||
Reference in New Issue
Block a user