neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

nlua0.c (324B)


      1 #include <lua.h>
      2 
      3 #include "mpack/lmpack.h"
      4 
      5 LUA_API int luaopen_nlua0(lua_State* L);
      6 
      7 LUA_API int luaopen_nlua0(lua_State* L) {
      8  lua_getglobal(L, "vim");
      9  luaopen_mpack(L);
     10  lua_setfield(L, -2, "mpack");
     11 
     12  int luaopen_lpeg(lua_State *);
     13  luaopen_lpeg(L);
     14  lua_setfield(L, -3, "lpeg");
     15  lua_pop(L, 2);
     16 
     17  return 1;
     18 }