mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 04:18:18 +00:00
feat(lua): add semver api
This commit is contained in:

committed by
Justin M. Keyes

parent
f9a46391ab
commit
0e7196438d
@@ -165,17 +165,6 @@ static int nlua_pcall(lua_State *lstate, int nargs, int nresults)
|
||||
return status;
|
||||
}
|
||||
|
||||
/// Gets the version of the current Nvim build.
|
||||
///
|
||||
/// @param lstate Lua interpreter state.
|
||||
static int nlua_nvim_version(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
Dictionary version = version_dict();
|
||||
nlua_push_Dictionary(lstate, version, true);
|
||||
api_free_dictionary(version);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void nlua_luv_error_event(void **argv)
|
||||
{
|
||||
char *error = (char *)argv[0];
|
||||
@@ -739,10 +728,6 @@ static bool nlua_state_init(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL
|
||||
// vim.types, vim.type_idx, vim.val_idx
|
||||
nlua_init_types(lstate);
|
||||
|
||||
// neovim version
|
||||
lua_pushcfunction(lstate, &nlua_nvim_version);
|
||||
lua_setfield(lstate, -2, "version");
|
||||
|
||||
// schedule
|
||||
lua_pushcfunction(lstate, &nlua_schedule);
|
||||
lua_setfield(lstate, -2, "schedule");
|
||||
|
Reference in New Issue
Block a user