mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
Merge pull request #23250 from bfredl/vimvim
refactor(build): move the last generator from scripts/ to src/nvim/generators
This commit is contained in:
commit
a0adc51dac
@ -1,4 +1,4 @@
|
||||
set(SYN_VIM_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/genvimvim.lua)
|
||||
set(SYN_VIM_GENERATOR ${PROJECT_SOURCE_DIR}/src/nvim/generators/gen_vimvim.lua)
|
||||
set(GENERATED_RUNTIME_DIR ${PROJECT_BINARY_DIR}/runtime)
|
||||
set(GENERATED_SYN_VIM ${GENERATED_RUNTIME_DIR}/syntax/vim/generated.vim)
|
||||
set(GENERATED_HELP_TAGS ${GENERATED_RUNTIME_DIR}/doc/tags)
|
||||
@ -13,8 +13,7 @@ get_directory_property(LUA_GEN DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITI
|
||||
get_directory_property(LUA_GEN_DEPS DIRECTORY ${PROJECT_SOURCE_DIR}/src/nvim DEFINITION LUA_GEN_DEPS)
|
||||
|
||||
add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
|
||||
COMMAND ${LUA_GEN} ${SYN_VIM_GENERATOR}
|
||||
${PROJECT_SOURCE_DIR}/src/nvim ${GENERATED_SYN_VIM} ${FUNCS_DATA}
|
||||
COMMAND ${LUA_GEN} ${SYN_VIM_GENERATOR} ${GENERATED_SYN_VIM} ${FUNCS_DATA}
|
||||
DEPENDS
|
||||
${LUA_GEN_DEPS}
|
||||
${SYN_VIM_GENERATOR}
|
||||
|
@ -1,17 +1,7 @@
|
||||
local mpack = vim.mpack
|
||||
|
||||
if arg[1] == '--help' then
|
||||
print('Usage: lua genvimvim.lua src/nvim runtime/syntax/vim/generated.vim')
|
||||
os.exit(0)
|
||||
end
|
||||
|
||||
local nvimsrcdir = arg[1]
|
||||
local syntax_file = arg[2]
|
||||
local funcs_file = arg[3]
|
||||
|
||||
package.path = nvimsrcdir .. '/?.lua;' .. package.path
|
||||
|
||||
_G.vim = loadfile(nvimsrcdir..'/../../runtime/lua/vim/shared.lua')()
|
||||
local syntax_file = arg[1]
|
||||
local funcs_file = arg[2]
|
||||
|
||||
local lld = {}
|
||||
local syn_fd = io.open(syntax_file, 'w')
|
Loading…
Reference in New Issue
Block a user