1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 07:10:06 +08:00

Fix lua runtime path (#3317)

close #3265
This commit is contained in:
Wang Shidong 2020-01-31 21:38:24 +08:00 committed by GitHub
parent c50bc1eced
commit b4f9904579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

9
vimrc
View File

@ -10,8 +10,13 @@
if 1
let g:_spacevim_if_lua = 0
if has('lua')
let s:plugin_dir = fnamemodify(expand('<sfile>'), ':h').'\lua'
let s:str = s:plugin_dir . '\?.lua;' . s:plugin_dir . '\?\init.lua;'
if has('win16') || has('win32') || has('win64')
let s:plugin_dir = fnamemodify(expand('<sfile>'), ':h').'\lua'
let s:str = s:plugin_dir . '\?.lua;' . s:plugin_dir . '\?\init.lua;'
else
let s:plugin_dir = fnamemodify(expand('<sfile>'), ':h').'/lua'
let s:str = s:plugin_dir . '/?.lua;' . s:plugin_dir . '/?/init.lua;'
endif
silent! lua package.path=vim.eval("s:str") .. package.path
if empty(v:errmsg)
let g:_spacevim_if_lua = 1