neovim

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

preload_nlua.lua (504B)


      1 local srcdir = table.remove(arg, 1)
      2 local nlualib = table.remove(arg, 1)
      3 local gendir = table.remove(arg, 1)
      4 
      5 package.path = (srcdir .. '/src/?.lua;')
      6  .. (srcdir .. '/runtime/lua/?.lua;')
      7  .. (gendir .. '/?.lua;')
      8  .. package.path
      9 
     10 _G.vim = require 'vim._core.shared'
     11 _G.vim.inspect = require 'vim.inspect'
     12 _G.vim.iter = require 'vim.iter'
     13 package.cpath = package.cpath .. ';' .. nlualib
     14 require 'nlua0'
     15 vim.NIL = vim.mpack.NIL -- WOW BOB WOW
     16 
     17 arg[0] = table.remove(arg, 1)
     18 return loadfile(arg[0])()