diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index 5fcb7ea66..5ddced0c7 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -1744,7 +1744,7 @@ function! s:parser_argv() abort " if use embed nvim " for exmaple: neovim-qt " or only run vim/neovim without argvs - if len(v:argv) == 1 + if len(v:argv) == 1 || (len(v:argv) == 2 && index(v:argv, '--embed') == 1) return [0] elseif index(v:argv, '--embed') !=# -1 if v:argv[-1] =~# '/$' diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim index 35551e4a1..0a582e557 100644 --- a/autoload/SpaceVim/default.vim +++ b/autoload/SpaceVim/default.vim @@ -146,7 +146,7 @@ endfunction "}}} function! SpaceVim#default#layers() abort - call SpaceVim#logger#debug('init default layer list.') + call SpaceVim#logger#info('init default layer list.') call SpaceVim#layers#load('autocomplete') call SpaceVim#layers#load('checkers') call SpaceVim#layers#load('format') @@ -156,10 +156,11 @@ function! SpaceVim#default#layers() abort call SpaceVim#layers#load('core#banner') call SpaceVim#layers#load('core#statusline') call SpaceVim#layers#load('core#tabline') + call SpaceVim#logger#info('layer list init done') endfunction function! SpaceVim#default#keyBindings() abort - call SpaceVim#logger#debug('init default key bindings.') + call SpaceVim#logger#info('init default key bindings.') xnoremap y :call clipboard#yank() nnoremap p clipboard#paste('p') nnoremap P clipboard#paste('P') @@ -271,7 +272,7 @@ function! SpaceVim#default#keyBindings() abort nnoremap :call tobur(5) nnoremap :call tobur("next") nnoremap :call tobur("prev") - + call SpaceVim#logger#info('default key binding init done') endfunction fu! s:tobur(num) abort diff --git a/autoload/SpaceVim/layers.vim b/autoload/SpaceVim/layers.vim index a0e2b4c41..95c986cd6 100644 --- a/autoload/SpaceVim/layers.vim +++ b/autoload/SpaceVim/layers.vim @@ -74,10 +74,12 @@ function! SpaceVim#layers#load(layer, ...) abort elseif empty(a:layer) || type(a:layer) !=# type('') return endif + call SpaceVim#logger#info('load layer:' . a:layer) let loadable = 1 try let loadable = SpaceVim#layers#{a:layer}#loadable() catch /^Vim\%((\a\+)\)\=:E117/ + call SpaceVim#logger#info(a:layer . ' layer do not implement loadable function') endtry if index(s:enabled_layers, a:layer) == -1 if loadable @@ -94,6 +96,7 @@ function! SpaceVim#layers#load(layer, ...) abort call SpaceVim#layers#{a:layer}#set_variable(a:1) let s:layers_vars[a:layer] = a:1 catch /^Vim\%((\a\+)\)\=:E117/ + call SpaceVim#logger#info(a:layer . ' layer do not implement set_variable function') endtry endif if a:0 > 0 && type(a:1) == 1 @@ -101,6 +104,7 @@ function! SpaceVim#layers#load(layer, ...) abort call SpaceVim#layers#load(l) endfor endif + call SpaceVim#logger#info('layer loaded.') endfunction function! SpaceVim#layers#disable(layer) abort diff --git a/autoload/SpaceVim/layers/VersionControl.vim b/autoload/SpaceVim/layers/VersionControl.vim index cb40634eb..acddb748b 100644 --- a/autoload/SpaceVim/layers/VersionControl.vim +++ b/autoload/SpaceVim/layers/VersionControl.vim @@ -21,6 +21,10 @@ scriptencoding utf-8 " SPC g . version control transient state " < +if exists('s:CMP') + finish +endif + let s:CMP = SpaceVim#api#import('vim#compatible') let s:enable_gtm_status = 0 @@ -512,6 +516,12 @@ function! s:git_transient_state() abort call state.open() endfunction +function! SpaceVim#layers#VersionControl#loadable() abort + + return 1 + +endfunction + " function() wrapper {{{ if v:version > 703 || v:version == 703 && has('patch1170') function! s:_function(fstr) abort diff --git a/autoload/SpaceVim/layers/autocomplete.vim b/autoload/SpaceVim/layers/autocomplete.vim index e64e23964..76a2583ab 100644 --- a/autoload/SpaceVim/layers/autocomplete.vim +++ b/autoload/SpaceVim/layers/autocomplete.vim @@ -313,5 +313,9 @@ endfunction function! s:restore_sequence_delay() abort let &timeoutlen = s:timeoutlen endfunction +function! SpaceVim#layers#autocomplete#loadable() abort + return 1 + +endfunction " vim:set et sw=2 cc=80: diff --git a/autoload/SpaceVim/layers/chat.vim b/autoload/SpaceVim/layers/chat.vim index 52d2cd2ae..aae76859f 100644 --- a/autoload/SpaceVim/layers/chat.vim +++ b/autoload/SpaceVim/layers/chat.vim @@ -67,3 +67,9 @@ function! SpaceVim#layers#chat#health() abort return 1 endfunction + +function! SpaceVim#layers#chat#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/checkers.vim b/autoload/SpaceVim/layers/checkers.vim index a7a7468b6..58bf80bf7 100644 --- a/autoload/SpaceVim/layers/checkers.vim +++ b/autoload/SpaceVim/layers/checkers.vim @@ -64,6 +64,12 @@ function! SpaceVim#layers#checkers#plugins() abort return plugins endfunction +function! SpaceVim#layers#checkers#loadable() abort + + return 1 + +endfunction + function! SpaceVim#layers#checkers#set_variable(var) abort let s:show_cursor_error = get(a:var, 'show_cursor_error', 1) diff --git a/autoload/SpaceVim/layers/colorscheme.vim b/autoload/SpaceVim/layers/colorscheme.vim index 1046f8881..11fba0c15 100644 --- a/autoload/SpaceVim/layers/colorscheme.vim +++ b/autoload/SpaceVim/layers/colorscheme.vim @@ -41,6 +41,10 @@ " " SpaceVim is not gonna fix them since these should be in charge of each author. +if exists('s:JSON') + finish +endif + let s:JSON = SpaceVim#api#import('data#json') function! SpaceVim#layers#colorscheme#plugins() abort @@ -170,6 +174,12 @@ function! SpaceVim#layers#colorscheme#health() abort return 1 endfunction +function! SpaceVim#layers#colorscheme#loadable() abort + + return 1 + +endfunction + " function() wrapper if v:version > 703 || v:version == 703 && has('patch1170') function! s:_function(fstr) abort diff --git a/autoload/SpaceVim/layers/core.vim b/autoload/SpaceVim/layers/core.vim index d3fcd905c..bfd9a4563 100644 --- a/autoload/SpaceVim/layers/core.vim +++ b/autoload/SpaceVim/layers/core.vim @@ -1223,4 +1223,10 @@ function! s:close_current_tab() abort endif endfunction +function! SpaceVim#layers#core#loadable() abort + + return 1 + +endfunction + " vim:set et sw=2 cc=80: diff --git a/autoload/SpaceVim/layers/core/banner.vim b/autoload/SpaceVim/layers/core/banner.vim index 02fd6c66e..e79ed6012 100644 --- a/autoload/SpaceVim/layers/core/banner.vim +++ b/autoload/SpaceVim/layers/core/banner.vim @@ -242,4 +242,16 @@ function! SpaceVim#layers#core#banner#health() abort return 1 endfunction +function! SpaceVim#layers#core#banner#loadable() abort + + return 1 + +endfunction + +function! SpaceVim#layers#core#banner#plugins() abort + + return [] + +endfunction + " vim:set et sw=2: diff --git a/autoload/SpaceVim/layers/core/statusline.vim b/autoload/SpaceVim/layers/core/statusline.vim index ace158f22..7cf448ca4 100644 --- a/autoload/SpaceVim/layers/core/statusline.vim +++ b/autoload/SpaceVim/layers/core/statusline.vim @@ -131,6 +131,18 @@ if has('nvim-0.10.0') return v:lua.require('spacevim.plugin.statusline').health() endfunction + function! SpaceVim#layers#core#statusline#loadable() abort + + return 1 + + endfunction + + function! SpaceVim#layers#core#statusline#plugins() abort + + return [] + + endfunction + finish endif diff --git a/autoload/SpaceVim/layers/core/tabline.vim b/autoload/SpaceVim/layers/core/tabline.vim index 0b31772b0..e63bc25db 100644 --- a/autoload/SpaceVim/layers/core/tabline.vim +++ b/autoload/SpaceVim/layers/core/tabline.vim @@ -89,6 +89,91 @@ endif let g:_spacevim_tabline_loaded = 1 +let s:enable_default_mappings = 1 + +if has('nvim-0.9.0') + function! SpaceVim#layers#core#tabline#get() abort + return v:lua.require('spacevim.plugin.tabline').get() + endfunction + + function! SpaceVim#layers#core#tabline#config() abort + lua require('spacevim.plugin.tabline').enable() + set tabline=%!v:lua.require('spacevim.plugin.tabline').get() + augroup SpaceVim_tabline + autocmd! + autocmd ColorScheme * lua require('spacevim.plugin.tabline').def_colors() + augroup END + if s:enable_default_mappings + nnoremap lua require('spacevim.plugin.tabline').move_to_previous() + nnoremap lua require('spacevim.plugin.tabline').move_to_next() + endif + let shift_keys = { + \ '1': '!', + \ '2': '@', + \ '3': '#', + \ '4': '$', + \ '5': '%', + \ '6': '^', + \ '7': '&', + \ '8': '*', + \ '9': '(', + \ '0': ')' + \} + + for i in range(1, 20) + let key = i % 10 + + if i > 10 + let key = shift_keys[string(key)] + endif + + exe "call SpaceVim#mapping#def('nmap ', '" . key + \ . "', ':call SpaceVim#layers#core#tabline#jump(" + \ . i . ")', 'Switch to airline tab " . i + \ . "', '', 'tabline index " . i . "')" + endfor + endfunction + + function! SpaceVim#layers#core#tabline#jump(id, ...) abort + call SpaceVim#logger#info(a:id) + call SpaceVim#logger#info(string(a:000)) + lua require('spacevim.plugin.tabline').jump(vim.api.nvim_eval('a:id')) + endfunction + + function! SpaceVim#layers#core#tabline#def_colors() abort + call v:lua.require('spacevim.plugin.tabline').def_colors() + endfunction + + function! SpaceVim#layers#core#tabline#health() abort + call SpaceVim#layers#core#tabline#config() + return 1 + endfunction + + function! SpaceVim#layers#core#tabline#loadable() abort + + return 1 + + endfunction + + function! SpaceVim#layers#core#tabline#plugins() abort + + return [] + + endfunction + + function! SpaceVim#layers#core#tabline#set_variable(var) abort + let s:enable_default_mappings = get(a:var, 'enable_default_mappings', s:enable_default_mappings) + endfunction + + function! SpaceVim#layers#core#tabline#get_options() abort + + return ['enable_default_mappings'] + + endfunction + finish +endif + + " loadding APIs {{{ let s:MESSLETTERS = SpaceVim#api#import('messletters') let s:FILE = SpaceVim#api#import('file') @@ -122,7 +207,6 @@ let [s:lsep , s:rsep] = ['', ''] let [s:ilsep , s:irsep] = ['', ''] -let s:enable_default_mappings = 1 function! s:get_no_empty(a, b) abort if empty(a:a) @@ -566,18 +650,6 @@ function! SpaceVim#layers#core#tabline#get() abort endfunction function! SpaceVim#layers#core#tabline#config() abort - if has('nvim-0.9.5') - lua require('spacevim.plugin.tabline').enable() - set tabline=%!v:lua.require('spacevim.plugin.tabline').get() - augroup SpaceVim_tabline - autocmd! - autocmd ColorScheme * lua require('spacevim.plugin.tabline').def_colors() - augroup END - if s:enable_default_mappings - nnoremap lua require('spacevim.plugin.tabline').move_to_previous() - nnoremap lua require('spacevim.plugin.tabline').move_to_next() - endif - else let [s:lsep , s:rsep] = get(s:separators, g:spacevim_statusline_separator, s:separators['arrow']) let [s:ilsep , s:irsep] = get(s:i_separators, g:spacevim_statusline_iseparator, s:separators['arrow']) set tabline=%!SpaceVim#layers#core#tabline#get() @@ -591,7 +663,6 @@ function! SpaceVim#layers#core#tabline#config() abort nnoremap :call move_tabpage(1) endif - endif let shift_keys = { \ '1': '!', \ '2': '@', @@ -622,10 +693,6 @@ endfunction function! SpaceVim#layers#core#tabline#jump(id, ...) abort call SpaceVim#logger#info(a:id) call SpaceVim#logger#info(string(a:000)) - if has('nvim-0.9.5') - lua require('spacevim.plugin.tabline').jump(vim.api.nvim_eval('a:id')) - return - endif if len(s:shown_items) >= a:id let item = s:shown_items[a:id - 1] let mouse = get(a:000, 1, '') @@ -683,6 +750,18 @@ function! SpaceVim#layers#core#tabline#health() abort return 1 endfunction +function! SpaceVim#layers#core#tabline#loadable() abort + + return 1 + +endfunction + +function! SpaceVim#layers#core#tabline#plugins() abort + + return [] + +endfunction + function! SpaceVim#layers#core#tabline#set_variable(var) abort let s:enable_default_mappings = get(a:var, 'enable_default_mappings', s:enable_default_mappings) endfunction diff --git a/autoload/SpaceVim/layers/edit.vim b/autoload/SpaceVim/layers/edit.vim index 9c5085788..93b2e1291 100644 --- a/autoload/SpaceVim/layers/edit.vim +++ b/autoload/SpaceVim/layers/edit.vim @@ -1069,3 +1069,9 @@ endfunction function! SpaceVim#layers#edit#add_ft_head_tamplate(ft, tamp) abort call extend(s:ft_head_tp, {a:ft : a:tamp}) endfunction + +function! SpaceVim#layers#edit#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/foldsearch.vim b/autoload/SpaceVim/layers/foldsearch.vim index 9469af6c1..df15a44c4 100644 --- a/autoload/SpaceVim/layers/foldsearch.vim +++ b/autoload/SpaceVim/layers/foldsearch.vim @@ -40,6 +40,30 @@ function! SpaceVim#layers#foldsearch#health() abort return 1 endfunction +function! SpaceVim#layers#foldsearch#plugins() abort + + return [] + +endfunction + +function! SpaceVim#layers#foldsearch#set_variable(var) abort + + + +endfunction + +function! SpaceVim#layers#foldsearch#get_options() abort + + return [] + +endfunction + +function! SpaceVim#layers#foldsearch#loadable() abort + + return 1 + +endfunction + let s:filename = expand(':~') let s:lnum = expand('') + 2 function! SpaceVim#layers#foldsearch#config() diff --git a/autoload/SpaceVim/layers/format.vim b/autoload/SpaceVim/layers/format.vim index 65da67f36..02f57b6fe 100644 --- a/autoload/SpaceVim/layers/format.vim +++ b/autoload/SpaceVim/layers/format.vim @@ -134,3 +134,9 @@ function! s:format() abort endif endif endfunction + +function! SpaceVim#layers#format#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/git.vim b/autoload/SpaceVim/layers/git.vim index 5f0382a21..e1986180b 100644 --- a/autoload/SpaceVim/layers/git.vim +++ b/autoload/SpaceVim/layers/git.vim @@ -194,4 +194,10 @@ function! SpaceVim#layers#git#health() abort endfunction +function! SpaceVim#layers#git#loadable() abort + + return 1 + +endfunction + " vim:set et sw=2 cc=80: diff --git a/autoload/SpaceVim/layers/github.vim b/autoload/SpaceVim/layers/github.vim index 823d94315..08be8502f 100644 --- a/autoload/SpaceVim/layers/github.vim +++ b/autoload/SpaceVim/layers/github.vim @@ -37,16 +37,16 @@ function! SpaceVim#layers#github#plugins() abort return [ \ [g:_spacevim_root_dir . 'bundle/github-issues.vim', {'merged' : 0, 'if' : has('python')}], \ [g:_spacevim_root_dir . 'bundle/vim-github-dashboard', { - \ 'merged' : 0, - \ 'if' : has('ruby'), - \ }], - \ ['tyru/open-browser-github.vim', { - \ 'depends': 'open-browser.vim', - \ 'on_cmd': ['OpenGithubFile', 'OpenGithubIssue', 'OpenGithubPullReq'], - \ }], - \ [g:_spacevim_root_dir . 'bundle/github.vim', {'merged' : 0}], - \ ['lambdalisue/vim-gista', {'merged' : 0}], - \ ] + \ 'merged' : 0, + \ 'if' : has('ruby'), + \ }], + \ ['tyru/open-browser-github.vim', { + \ 'depends': 'open-browser.vim', + \ 'on_cmd': ['OpenGithubFile', 'OpenGithubIssue', 'OpenGithubPullReq'], + \ }], + \ [g:_spacevim_root_dir . 'bundle/github.vim', {'merged' : 0}], + \ ['lambdalisue/vim-gista', {'merged' : 0}], + \ ] endfunction function! SpaceVim#layers#github#config() abort @@ -127,4 +127,15 @@ function! s:update_stared_repo_list() abort call add(g:unite_source_menu_menus.MyStarredrepos.command_candidates, [description,cmd]) endfor return 1 - endf +endfunction + + +function! SpaceVim#layers#github#set_variable(var) abort + +endfunction + +function! SpaceVim#layers#github#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/gtags.vim b/autoload/SpaceVim/layers/gtags.vim index 5d1d64524..238d34016 100644 --- a/autoload/SpaceVim/layers/gtags.vim +++ b/autoload/SpaceVim/layers/gtags.vim @@ -114,6 +114,12 @@ function! SpaceVim#layers#gtags#health() abort return 1 endfunction +function! SpaceVim#layers#gtags#loadable() abort + + return 1 + +endfunction + function! SpaceVim#layers#gtags#get_options() abort return ['gtagslabel', 'ctags_bin'] diff --git a/autoload/SpaceVim/layers/lang/c.vim b/autoload/SpaceVim/layers/lang/c.vim index dde385fb8..45b6242d0 100644 --- a/autoload/SpaceVim/layers/lang/c.vim +++ b/autoload/SpaceVim/layers/lang/c.vim @@ -524,3 +524,9 @@ function! SpaceVim#layers#lang#c#health() abort call SpaceVim#layers#lang#c#config() return 1 endfunction + +function! SpaceVim#layers#lang#c#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/lang/clojure.vim b/autoload/SpaceVim/layers/lang/clojure.vim index 90b8a19c9..d63983df3 100644 --- a/autoload/SpaceVim/layers/lang/clojure.vim +++ b/autoload/SpaceVim/layers/lang/clojure.vim @@ -167,3 +167,9 @@ function! SpaceVim#layers#lang#clojure#health() abort call SpaceVim#layers#lang#clojure#config() return 1 endfunction + +function! SpaceVim#layers#lang#clojure#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/lang/java.vim b/autoload/SpaceVim/layers/lang/java.vim index c8c8f1de5..1dd3ee781 100644 --- a/autoload/SpaceVim/layers/lang/java.vim +++ b/autoload/SpaceVim/layers/lang/java.vim @@ -393,3 +393,9 @@ function! SpaceVim#layers#lang#java#health() abort call SpaceVim#layers#lang#java#config() return 1 endfunction + +function! SpaceVim#layers#lang#java#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/lang/lua.vim b/autoload/SpaceVim/layers/lang/lua.vim index 6d6fb143d..95db64b01 100644 --- a/autoload/SpaceVim/layers/lang/lua.vim +++ b/autoload/SpaceVim/layers/lang/lua.vim @@ -174,3 +174,9 @@ function! SpaceVim#layers#lang#lua#health() abort call SpaceVim#layers#lang#lua#config() return 1 endfunction + +function! SpaceVim#layers#lang#lua#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/lang/markdown.vim b/autoload/SpaceVim/layers/lang/markdown.vim index df9a801ab..0fc4a5200 100644 --- a/autoload/SpaceVim/layers/lang/markdown.vim +++ b/autoload/SpaceVim/layers/lang/markdown.vim @@ -225,3 +225,9 @@ function! SpaceVim#layers#lang#markdown#health() abort call SpaceVim#layers#lang#markdown#config() return 1 endfunction + +function! SpaceVim#layers#lang#markdown#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/lang/python.vim b/autoload/SpaceVim/layers/lang/python.vim index f872714eb..0797f8915 100644 --- a/autoload/SpaceVim/layers/lang/python.vim +++ b/autoload/SpaceVim/layers/lang/python.vim @@ -344,3 +344,8 @@ function! SpaceVim#layers#lang#python#health() abort call SpaceVim#layers#lang#python#config() return 1 endfunction +function! SpaceVim#layers#lang#python#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/lang/scheme.vim b/autoload/SpaceVim/layers/lang/scheme.vim index 6c8a5cdbf..6ff6cc4a0 100644 --- a/autoload/SpaceVim/layers/lang/scheme.vim +++ b/autoload/SpaceVim/layers/lang/scheme.vim @@ -48,6 +48,13 @@ endif " < " +function! SpaceVim#layers#lang#scheme#plugins() abort + + return [] + +endfunction + + function! SpaceVim#layers#lang#scheme#config() abort if s:scheme_dialect ==# 'mit-scheme' if has('win32') @@ -106,3 +113,9 @@ function! SpaceVim#layers#lang#scheme#health() abort call SpaceVim#layers#lang#scheme#config() return 1 endfunction + +function! SpaceVim#layers#lang#scheme#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/lang/sh.vim b/autoload/SpaceVim/layers/lang/sh.vim index e4da931f8..b7b135aaa 100644 --- a/autoload/SpaceVim/layers/lang/sh.vim +++ b/autoload/SpaceVim/layers/lang/sh.vim @@ -92,3 +92,9 @@ function! SpaceVim#layers#lang#sh#health() abort call SpaceVim#layers#lang#sh#config() return 1 endfunction + +function! SpaceVim#layers#lang#sh#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/lang/sql.vim b/autoload/SpaceVim/layers/lang/sql.vim index 17337002f..42ec9ce0a 100644 --- a/autoload/SpaceVim/layers/lang/sql.vim +++ b/autoload/SpaceVim/layers/lang/sql.vim @@ -83,3 +83,8 @@ function! SpaceVim#layers#lang#sql#health() abort call SpaceVim#layers#lang#sql#plugins() return 1 endfunction +function! SpaceVim#layers#lang#sql#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/lang/toml.vim b/autoload/SpaceVim/layers/lang/toml.vim index 9e5da9c7a..1558b932b 100644 --- a/autoload/SpaceVim/layers/lang/toml.vim +++ b/autoload/SpaceVim/layers/lang/toml.vim @@ -33,3 +33,15 @@ function! SpaceVim#layers#lang#toml#health() abort call SpaceVim#layers#lang#toml#plugins() return 1 endfunction + +function! SpaceVim#layers#lang#toml#loadable() abort + + return 1 + +endfunction + +function! SpaceVim#layers#lang#toml#set_variable(var) abort + + + +endfunction diff --git a/autoload/SpaceVim/layers/lang/vim.vim b/autoload/SpaceVim/layers/lang/vim.vim index b060cf0f1..7eb4f179f 100644 --- a/autoload/SpaceVim/layers/lang/vim.vim +++ b/autoload/SpaceVim/layers/lang/vim.vim @@ -218,3 +218,9 @@ function! SpaceVim#layers#lang#vim#health() abort call SpaceVim#layers#lang#vim#config() return 1 endfunction + +function! SpaceVim#layers#lang#vim#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/lsp.vim b/autoload/SpaceVim/layers/lsp.vim index b5d0619dd..4f4db4154 100644 --- a/autoload/SpaceVim/layers/lsp.vim +++ b/autoload/SpaceVim/layers/lsp.vim @@ -52,6 +52,12 @@ function! SpaceVim#layers#lsp#health() abort return 1 endfunction +function! SpaceVim#layers#lsp#loadable() abort + + return 1 + +endfunction + function! SpaceVim#layers#lsp#setup() abort lua require("spacevim.lsp").setup( diff --git a/autoload/SpaceVim/layers/shell.vim b/autoload/SpaceVim/layers/shell.vim index fa267d98c..1def30724 100644 --- a/autoload/SpaceVim/layers/shell.vim +++ b/autoload/SpaceVim/layers/shell.vim @@ -304,3 +304,9 @@ function! SpaceVim#layers#shell#health() abort call SpaceVim#layers#shell#config() return 1 endfunction + +function! SpaceVim#layers#shell#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/telescope.vim b/autoload/SpaceVim/layers/telescope.vim index bbb314765..c0377a60b 100644 --- a/autoload/SpaceVim/layers/telescope.vim +++ b/autoload/SpaceVim/layers/telescope.vim @@ -387,3 +387,15 @@ function! SpaceVim#layers#telescope#health() abort return 1 endfunction + +function! SpaceVim#layers#telescope#set_variable(var) abort + + + +endfunction + +function! SpaceVim#layers#telescope#get_options() abort + + return [] + +endfunction diff --git a/autoload/SpaceVim/layers/tools.vim b/autoload/SpaceVim/layers/tools.vim index b191e03ca..bf0f3b2aa 100644 --- a/autoload/SpaceVim/layers/tools.vim +++ b/autoload/SpaceVim/layers/tools.vim @@ -73,4 +73,10 @@ function! SpaceVim#layers#tools#health() abort return 1 endfunction +function! SpaceVim#layers#tools#loadable() abort + + return 1 + +endfunction + " vim:set et sw=2 cc=80: diff --git a/autoload/SpaceVim/layers/tools/mpv.vim b/autoload/SpaceVim/layers/tools/mpv.vim index 1a3aff012..ef092a7f5 100644 --- a/autoload/SpaceVim/layers/tools/mpv.vim +++ b/autoload/SpaceVim/layers/tools/mpv.vim @@ -106,6 +106,24 @@ function! SpaceVim#layers#tools#mpv#health() abort return 1 endfunction +function! SpaceVim#layers#tools#mpv#loadable() abort + + return 1 + +endfunction + +function! SpaceVim#layers#tools#mpv#plugins() abort + + return [] + +endfunction + +function! SpaceVim#layers#tools#mpv#get_options() abort + + return ['musics_directory', 'mpv_interpreter'] + +endfunction + let s:playId = 0 fu! s:handler(id, data, event) abort if a:event ==# 'exit' diff --git a/autoload/SpaceVim/layers/ui.vim b/autoload/SpaceVim/layers/ui.vim index d617765c1..dcc844646 100644 --- a/autoload/SpaceVim/layers/ui.vim +++ b/autoload/SpaceVim/layers/ui.vim @@ -721,3 +721,9 @@ function! s:reduce_font() abort let &guifont = substitute(&guifont, ':h\d\+', ':h' . font_size, '') sleep 100m endfunction + +function! SpaceVim#layers#ui#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/layers/vim.vim b/autoload/SpaceVim/layers/vim.vim index afc544839..87484bef5 100644 --- a/autoload/SpaceVim/layers/vim.vim +++ b/autoload/SpaceVim/layers/vim.vim @@ -26,3 +26,9 @@ function! SpaceVim#layers#vim#health() abort call SpaceVim#layers#vim#config() return 1 endfunction + +function! SpaceVim#layers#vim#loadable() abort + + return 1 + +endfunction diff --git a/autoload/SpaceVim/plugins.vim b/autoload/SpaceVim/plugins.vim index 8b2bbe958..e351ec29a 100644 --- a/autoload/SpaceVim/plugins.vim +++ b/autoload/SpaceVim/plugins.vim @@ -58,6 +58,7 @@ function! s:getLayerPlugins(layer) abort try let p = SpaceVim#layers#{a:layer}#plugins() catch /^Vim\%((\a\+)\)\=:E117/ + call SpaceVim#logger#info(a:layer . ' layer do not implement plugins function') endtry return p endfunction @@ -67,6 +68,7 @@ function! s:loadLayerConfig(layer) abort try call SpaceVim#layers#{a:layer}#config() catch /^Vim\%((\a\+)\)\=:E117/ + call SpaceVim#logger#info(a:layer . ' layer do not implement config function') endtry endfunction