Fix lua search path in vim

This time for real (hopefully)
This commit is contained in:
Talia 2018-10-08 09:13:49 +02:00
parent 183ba2ee0c
commit 16e6437b02
1 changed files with 1 additions and 2 deletions

3
vimrc
View File

@ -667,10 +667,9 @@ vnoremap <C-CR> ""y<CR>
\ :call setreg("\"", substitute(getreg("\""), "\n", "", ""), "v")<CR>
\ :<C-r>"<CR>`<
let $LUA_PATH_5_3 = system("lua -e 'print(package.path)'").";".expand("<sfile>:p:h")."/lua/?.lua"
let g:mooncompile = "!moonc ".expand("<sfile>:p:h")."/lua"
command! Mooncompile silent exec g:mooncompile
let g:exe_prg = "moonc -- \| lua -l vim -"
let g:exe_prg = 'moonc -- \| lua -e "package.path=package.path..[[;'.expand('<sfile>:p:h').'\lua\?.lua]];vim=require[[vim]]" -'
vnoremap <CR> :<C-U>exec "'<,'>!".g:exe_prg<CR>
inoremap <C-Space> <C-[>0v$:<C-U>exec "'<,'>!".g:exe_prg<CR>