mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 00:50:05 +08:00
feat(lua): support ~/.SpaceVim.d/init.lua
This commit is contained in:
parent
24d485eb49
commit
82aed9b5ac
16
.SpaceVim.d/init.lua
Normal file
16
.SpaceVim.d/init.lua
Normal 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
|
||||||
|
})
|
@ -338,6 +338,11 @@ function! s:load_glob_conf() abort
|
|||||||
let custom_glob_conf = global_dir . 'init.vim'
|
let custom_glob_conf = global_dir . 'init.vim'
|
||||||
let &rtp = global_dir . ',' . &rtp . ',' . global_dir . 'after'
|
let &rtp = global_dir . ',' . &rtp . ',' . global_dir . 'after'
|
||||||
exe 'source ' . custom_glob_conf
|
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
|
else
|
||||||
if has('timers')
|
if has('timers')
|
||||||
" if there is no custom config auto generate it.
|
" if there is no custom config auto generate it.
|
||||||
|
Loading…
Reference in New Issue
Block a user