mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 17:49:57 +08:00
Add simple lua mode (#2859)
This commit is contained in:
parent
d773bbeb20
commit
b14c2d1e39
2
init.vim
2
init.vim
@ -7,3 +7,5 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
|
|
||||||
execute 'source' fnamemodify(expand('<sfile>'), ':h').'/config/main.vim'
|
execute 'source' fnamemodify(expand('<sfile>'), ':h').'/config/main.vim'
|
||||||
|
|
||||||
|
lua require('spacevim').bootstrap()
|
||||||
|
16
lua/spacevim.lua
Normal file
16
lua/spacevim.lua
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
local spacevim = {}
|
||||||
|
|
||||||
|
|
||||||
|
local options = require('spacevim.opt')
|
||||||
|
local layers = require('spacevim.layer')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function spacevim.bootstrap()
|
||||||
|
|
||||||
|
options.init()
|
||||||
|
layers.init()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
return spacevim
|
9
lua/spacevim/api.lua
Normal file
9
lua/spacevim/api.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
local api = {}
|
||||||
|
|
||||||
|
|
||||||
|
function api.import(name)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
return api
|
0
lua/spacevim/api/Data/string.lua
Normal file
0
lua/spacevim/api/Data/string.lua
Normal file
9
lua/spacevim/layer.lua
Normal file
9
lua/spacevim/layer.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
local layer = {}
|
||||||
|
|
||||||
|
|
||||||
|
function layer.init()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
return layer
|
14
lua/spacevim/opt.lua
Normal file
14
lua/spacevim/opt.lua
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
local options = {}
|
||||||
|
|
||||||
|
options._opts = {}
|
||||||
|
|
||||||
|
|
||||||
|
function options.init()
|
||||||
|
options._opts.version = '1.2.0-dev'
|
||||||
|
-- Change the default indentation of SpaceVim, default is 2.
|
||||||
|
options._opts.default_indent = 2
|
||||||
|
options._opts.expand_tab = true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
return options
|
Loading…
x
Reference in New Issue
Block a user