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

feat(lua): support ~/.SpaceVim.d/init.lua

This commit is contained in:
wsdjeg 2022-06-18 23:25:54 +08:00
parent 24d485eb49
commit 82aed9b5ac
2 changed files with 21 additions and 0 deletions

16
.SpaceVim.d/init.lua Normal file
View File

@ -0,0 +1,16 @@
--=============================================================================
-- init.lua --- demo
-- Copyright (c) 2016-2019 Wang Shidong & Contributors
-- Author: Wang Shidong < wsdjeg@outlook.com >
-- URL: https://spacevim.org
-- License: GPLv3
--=============================================================================
local layer = require('spacevim.layer')
local opt = require('spacevim.opt')
opt.colorscheme = 'one'
layer.load('lang#java', {
format_on_save = false
})

View File

@ -338,6 +338,11 @@ function! s:load_glob_conf() abort
let custom_glob_conf = global_dir . 'init.vim'
let &rtp = global_dir . ',' . &rtp . ',' . global_dir . 'after'
exe 'source ' . custom_glob_conf
elseif filereadable(global_dir . 'init.lua')
let g:_spacevim_global_config_path = global_dir . 'init.lua'
let custom_glob_conf = global_dir . 'init.lua'
let &rtp = global_dir . ',' . &rtp . ',' . global_dir . 'after'
exe 'luafile ' . custom_glob_conf
else
if has('timers')
" if there is no custom config auto generate it.