2017-12-12 16:32:21 +08:00
|
|
|
"=============================================================================
|
|
|
|
" vimrc --- Entry file for vim
|
2022-06-12 15:37:35 +08:00
|
|
|
" Copyright (c) 2016-2022 Shidong Wang & Contributors
|
2020-09-19 16:19:58 +08:00
|
|
|
" Author: Shidong Wang < wsdjeg@outlook.com >
|
2017-12-12 16:32:21 +08:00
|
|
|
" URL: https://spacevim.org
|
2018-02-15 22:25:03 +08:00
|
|
|
" License: GPLv3
|
2017-12-12 16:32:21 +08:00
|
|
|
"=============================================================================
|
|
|
|
|
2016-12-26 20:36:18 +08:00
|
|
|
" Note: Skip initialization for vim-tiny or vim-small.
|
|
|
|
if 1
|
2019-10-08 22:24:03 +08:00
|
|
|
let g:_spacevim_if_lua = 0
|
|
|
|
if has('lua')
|
2022-03-29 21:48:33 +08:00
|
|
|
" add ~/.SpaceVim/lua to lua package path
|
2020-01-31 21:38:24 +08:00
|
|
|
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
|
2019-10-11 23:07:03 +08:00
|
|
|
silent! lua package.path=vim.eval("s:str") .. package.path
|
|
|
|
if empty(v:errmsg)
|
2019-10-08 22:24:03 +08:00
|
|
|
let g:_spacevim_if_lua = 1
|
2019-10-11 23:07:03 +08:00
|
|
|
endif
|
2019-10-08 22:24:03 +08:00
|
|
|
endif
|
2022-11-20 12:33:55 +08:00
|
|
|
execute 'source' fnamemodify(expand('<sfile>'), ':h').'/init.vim'
|
2016-12-26 20:36:18 +08:00
|
|
|
endif
|
2017-03-06 23:26:26 +08:00
|
|
|
" vim:set et sw=2
|