diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index cdc551c33..488a50f3b 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -209,6 +209,14 @@ let g:spacevim_default_indent = 2 " In Insert mode: Use the appropriate number of spaces to insert a let g:spacevim_expand_tab = 1 +"" +" @section if_ruby, options-if_ruby +" @parentsection options +" Neovim if_ruby provider is too slow, If you are sure that your nvim does not +" support ruby, set this option to false. default is true. + +let g:spacevim_if_ruby = 1 + "" " @section enable_list_mode, options-enable_list_mode " @parentsection options @@ -1629,7 +1637,8 @@ endif command! -nargs=1 LeaderGuide call SpaceVim#mapping#guide#start_by_prefix('0', ) command! -range -nargs=1 LeaderGuideVisual call SpaceVim#mapping#guide#start_by_prefix('1', ) -function! SpaceVim#end() abort +function! s:lazy_end(...) abort + if g:spacevim_vimcompatible let g:spacevim_windows_leader = '' let g:spacevim_windows_smartclose = '' @@ -1691,11 +1700,6 @@ function! SpaceVim#end() abort if !empty(g:spacevim_language) silent exec 'lan ' . g:spacevim_language endif - - if SpaceVim#layers#isLoaded('core#statusline') - call SpaceVim#layers#core#statusline#init() - endif - " tab options: set smarttab let &expandtab = g:spacevim_expand_tab @@ -1728,13 +1732,49 @@ function! SpaceVim#end() abort vnoremap :LeaderGuideVisual get(g:, 'mapleader', '\') endif let g:leaderGuide_max_size = 15 - call SpaceVim#plugins#load() - exe 'set wildignore+=' . g:spacevim_wildignore " shell if has('filterpipe') set noshelltemp endif + +endfunction + +function! SpaceVim#end() abort + let g:_spacevim_mappings_prefixs['[SPC]'] = {'name' : '+SPC prefix'} + let g:_spacevim_mappings_space.t = {'name' : '+Toggles'} + let g:_spacevim_mappings_space.t.h = {'name' : '+Toggles highlight'} + let g:_spacevim_mappings_space.t.m = {'name' : '+modeline'} + let g:_spacevim_mappings_space.T = {'name' : '+UI toggles/themes'} + let g:_spacevim_mappings_space.a = {'name' : '+Applications'} + let g:_spacevim_mappings_space.b = {'name' : '+Buffers'} + let g:_spacevim_mappings_space.f = {'name' : '+Files'} + let g:_spacevim_mappings_space.j = {'name' : '+Jump/Join/Split'} + let g:_spacevim_mappings_space.m = {'name' : '+Major-mode'} + let g:_spacevim_mappings_space.w = {'name' : '+Windows'} + let g:_spacevim_mappings_space.p = {'name' : '+Projects/Packages'} + let g:_spacevim_mappings_space.h = {'name' : '+Help'} + let g:_spacevim_mappings_space.n = {'name' : '+Narrow/Numbers'} + let g:_spacevim_mappings_space.q = {'name' : '+Quit'} + let g:_spacevim_mappings_space.l = {'name' : '+Language Specified'} + let g:_spacevim_mappings_space.s = {'name' : '+Searching/Symbol'} + let g:_spacevim_mappings_space.r = {'name' : '+Registers/rings/resume'} + let g:_spacevim_mappings_space.d = {'name' : '+Debug'} + let g:_spacevim_mappings_space.e = {'name' : '+Errors/Encoding'} + let g:_spacevim_mappings_space.B = {'name' : '+Global buffers'} + let &tabline = ' ' + if has('timers') + call timer_start(300, function('s:lazy_end')) + else + call s:lazy_end() + endif + + if SpaceVim#layers#isLoaded('core#statusline') + call SpaceVim#layers#core#statusline#init() + endif + + call SpaceVim#plugins#load() + if g:spacevim_enable_guicolors == 1 if !has('nvim') && has('patch-7.4.1770') let &t_8f = "\[38;2;%lu;%lu;%lum" @@ -1983,6 +2023,15 @@ function! SpaceVim#welcome() abort endif if g:spacevim_enable_vimfiler_welcome \ && get(g:, '_spacevim_checking_flag', 0) == 0 + if has('timers') + call timer_start(500, function('s:open_filetree')) + else + call s:open_filetree() + endif + endif +endfunction + +function! s:open_filetree(...) abort if exists(':VimFiler') == 2 VimFiler wincmd p @@ -2006,7 +2055,7 @@ function! SpaceVim#welcome() abort elseif exists(':Neotree') == 2 NeoTreeShow endif - endif + endfunction "" diff --git a/autoload/SpaceVim/custom.vim b/autoload/SpaceVim/custom.vim index ea310aa98..e76275612 100644 --- a/autoload/SpaceVim/custom.vim +++ b/autoload/SpaceVim/custom.vim @@ -165,6 +165,9 @@ function! s:apply(config, type) abort elseif value ==# 'neo-tree' && !has('nvim') call SpaceVim#logger#warn('neo-tree requires neovim') continue + elseif value ==# 'nvim-tree' && !has('nvim') + call SpaceVim#logger#warn('nvim-tree requires neovim') + continue endif " keep backward compatibility elseif name ==# 'autocomplete_method' diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim index 0a582e557..72d5abcb3 100644 --- a/autoload/SpaceVim/default.vim +++ b/autoload/SpaceVim/default.vim @@ -140,6 +140,9 @@ function! SpaceVim#default#options() abort " Do not wrap lone lines set nowrap + " disable all bell + set belloff=all + set foldtext=SpaceVim#default#Customfoldtext() endfunction @@ -159,7 +162,7 @@ function! SpaceVim#default#layers() abort call SpaceVim#logger#info('layer list init done') endfunction -function! SpaceVim#default#keyBindings() abort +function! SpaceVim#default#keyBindings(...) abort call SpaceVim#logger#info('init default key bindings.') xnoremap y :call clipboard#yank() nnoremap p clipboard#paste('p') diff --git a/autoload/SpaceVim/layers/core.vim b/autoload/SpaceVim/layers/core.vim index 027eb08bd..392f52a73 100644 --- a/autoload/SpaceVim/layers/core.vim +++ b/autoload/SpaceVim/layers/core.vim @@ -196,12 +196,12 @@ function! SpaceVim#layers#core#plugins() abort \ }]) call add(plugins, [g:_spacevim_root_dir . 'bundle/vimproc.vim', {'build' : [(executable('gmake') ? 'gmake' : 'make')]}]) elseif g:spacevim_filemanager ==# 'defx' - call add(plugins, [g:_spacevim_root_dir . 'bundle/defx.nvim',{'merged' : 0, 'loadconf' : 1 , 'loadconf_before' : 1, 'on_cmd' : 'Defx'}]) + call add(plugins, [g:_spacevim_root_dir . 'bundle/defx.nvim',{'merged' : 0, 'loadconf' : 1, 'on_cmd' : 'Defx'}]) call add(plugins, [g:_spacevim_root_dir . 'bundle/defx-git',{'merged' : 0, 'loadconf' : 1}]) call add(plugins, [g:_spacevim_root_dir . 'bundle/defx-icons',{'merged' : 0}]) call add(plugins, [g:_spacevim_root_dir . 'bundle/defx-sftp',{'merged' : 0}]) elseif g:spacevim_filemanager ==# 'nvim-tree' - call add(plugins, [g:_spacevim_root_dir . 'bundle/nvim-tree.lua',{'merged' : 0, 'loadconf' : 1}]) + call add(plugins, [g:_spacevim_root_dir . 'bundle/nvim-tree.lua',{'merged' : 0, 'loadconf' : 1, 'on_cmd' : ['NvimTreeOpen', 'NvimTree', 'NvimTreeToggle', 'NvimTreeFindFile']}]) call add(plugins, [g:_spacevim_root_dir . 'bundle/nvim-web-devicons',{'merged' : 0, 'loadconf' : 1}]) elseif g:spacevim_filemanager ==# 'neo-tree' call add(plugins, [g:_spacevim_root_dir . 'bundle/neo-tree.nvim',{'merged' : 0, 'loadconf' : 1}]) @@ -252,6 +252,12 @@ function! SpaceVim#layers#core#config() abort if g:spacevim_filemanager ==# 'nerdtree' noremap :NERDTreeToggle + elseif g:spacevim_filemanager ==# 'defx' + nnoremap :Defx + elseif g:spacevim_filemanager ==# 'nvim-tree' + nnoremap NvimTreeToggle + elseif g:spacevim_filemanager ==# 'neo-tree' + nnoremap NeoTreeFocusToggle endif let g:matchup_matchparen_status_offscreen = 0 let g:smoothie_no_default_mappings = !s:enable_smooth_scrolling diff --git a/autoload/SpaceVim/layers/github.vim b/autoload/SpaceVim/layers/github.vim index 0f0ce4c8b..8b4d91480 100644 --- a/autoload/SpaceVim/layers/github.vim +++ b/autoload/SpaceVim/layers/github.vim @@ -38,7 +38,7 @@ function! SpaceVim#layers#github#plugins() abort \ [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'), + \ 'if' : g:spacevim_if_ruby && has('ruby'), \ 'on_cmd' : ['GHActivity', 'GHDashboard'], \ }], \ ['tyru/open-browser-github.vim', { @@ -82,7 +82,7 @@ function! SpaceVim#layers#github#config() abort endif "" }}} - if has('ruby') + if g:spacevim_if_ruby && has('ruby') " vim-github-dashboard requires if_ruby let g:github_dashboard = { \ 'username': g:spacevim_github_username, diff --git a/autoload/SpaceVim/layers/zettelkasten.vim b/autoload/SpaceVim/layers/zettelkasten.vim index 08235ddeb..106aa30c1 100644 --- a/autoload/SpaceVim/layers/zettelkasten.vim +++ b/autoload/SpaceVim/layers/zettelkasten.vim @@ -10,7 +10,7 @@ function! SpaceVim#layers#zettelkasten#plugins() abort let plugins = [] call add(plugins, [g:_spacevim_root_dir . 'bundle/vim-zettelkasten', \ { - \ 'merged' : 0, + \ 'merged' : 0, 'on_cmd' : ['ZkNew', 'ZkBrowse', 'ZkListTemplete'], 'loadconf' : 1, \ }]) return plugins endfunction @@ -29,7 +29,7 @@ endfunction function! SpaceVim#layers#zettelkasten#config() abort let g:_spacevim_mappings_space.m.z = {'name' : '+zettelkasten'} call SpaceVim#mapping#space#def('nnoremap', ['m', 'z', 'n'], 'ZkNew', 'create-new-zettel-note', 1) - call SpaceVim#mapping#space#def('nnoremap', ['m', 'z', 't'], 'Telescope zettelkasten_template', 'zettel-template', 1) + call SpaceVim#mapping#space#def('nnoremap', ['m', 'z', 't'], 'ZkListTemplete', 'zettel-template', 1) call SpaceVim#mapping#space#def('nnoremap', ['m', 'z', 'b'], 'ZkBrowse', 'open-zettelkasten-browse', 1) endfunction diff --git a/autoload/SpaceVim/mapping/space.vim b/autoload/SpaceVim/mapping/space.vim index 1d516ed45..f270c3bee 100644 --- a/autoload/SpaceVim/mapping/space.vim +++ b/autoload/SpaceVim/mapping/space.vim @@ -14,25 +14,6 @@ let s:file = expand(':~') let s:funcbeginline = expand('') + 1 function! SpaceVim#mapping#space#init() abort call SpaceVim#logger#debug('init SPC key bindings') - let g:_spacevim_mappings_prefixs['[SPC]'] = {'name' : '+SPC prefix'} - let g:_spacevim_mappings_space.t = {'name' : '+Toggles'} - let g:_spacevim_mappings_space.t.h = {'name' : '+Toggles highlight'} - let g:_spacevim_mappings_space.t.m = {'name' : '+modeline'} - let g:_spacevim_mappings_space.T = {'name' : '+UI toggles/themes'} - let g:_spacevim_mappings_space.a = {'name' : '+Applications'} - let g:_spacevim_mappings_space.b = {'name' : '+Buffers'} - let g:_spacevim_mappings_space.f = {'name' : '+Files'} - let g:_spacevim_mappings_space.j = {'name' : '+Jump/Join/Split'} - let g:_spacevim_mappings_space.m = {'name' : '+Major-mode'} - let g:_spacevim_mappings_space.w = {'name' : '+Windows'} - let g:_spacevim_mappings_space.p = {'name' : '+Projects/Packages'} - let g:_spacevim_mappings_space.h = {'name' : '+Help'} - let g:_spacevim_mappings_space.n = {'name' : '+Narrow/Numbers'} - let g:_spacevim_mappings_space.q = {'name' : '+Quit'} - let g:_spacevim_mappings_space.l = {'name' : '+Language Specified'} - let g:_spacevim_mappings_space.s = {'name' : '+Searching/Symbol'} - let g:_spacevim_mappings_space.r = {'name' : '+Registers/rings/resume'} - let g:_spacevim_mappings_space.d = {'name' : '+Debug'} if s:has_map_to_spc() return endif @@ -371,8 +352,6 @@ function! SpaceVim#mapping#space#init() abort \ ] \ , 1) - let g:_spacevim_mappings_space.e = {'name' : '+Errors/Encoding'} - let g:_spacevim_mappings_space.B = {'name' : '+Global buffers'} if g:spacevim_relativenumber nnoremap [SPC]tn :setlocal nonumber! norelativenumber! let g:_spacevim_mappings_space.t.n = ['setlocal nonumber! norelativenumber!', 'toggle-line-number'] diff --git a/autoload/SpaceVim/plugins.vim b/autoload/SpaceVim/plugins.vim index e351ec29a..6117e3500 100644 --- a/autoload/SpaceVim/plugins.vim +++ b/autoload/SpaceVim/plugins.vim @@ -41,8 +41,12 @@ function! s:load_plugins() abort call SpaceVim#plugins#add(plugin[0], {'overwrite' : 1}) endif endfor - call s:loadLayerConfig(layer) endfor + if has('timers') + call timer_start(500, function('s:layer_config_timer'), {'repeat' : 1}) + else + call s:layer_config_timer(0) + endif unlet g:_spacevim_plugin_layer for plugin in g:spacevim_custom_plugins if len(plugin) == 2 @@ -63,6 +67,12 @@ function! s:getLayerPlugins(layer) abort return p endfunction +function! s:layer_config_timer(t) abort + for layer in SpaceVim#layers#get() + call s:loadLayerConfig(layer) + endfor +endfunction + function! s:loadLayerConfig(layer) abort call SpaceVim#logger#debug('load ' . a:layer . ' layer config.') try @@ -70,7 +80,6 @@ function! s:loadLayerConfig(layer) abort catch /^Vim\%((\a\+)\)\=:E117/ call SpaceVim#logger#info(a:layer . ' layer do not implement config function') endtry - endfunction let s:plugins_argv = ['-update', '-openurl'] diff --git a/bundle/git.vim/lua/git/command/branch.lua b/bundle/git.vim/lua/git/command/branch.lua index 84686c947..d269d9f37 100644 --- a/bundle/git.vim/lua/git/command/branch.lua +++ b/bundle/git.vim/lua/git/command/branch.lua @@ -39,7 +39,7 @@ local function update_branch_name(pwd, ...) if force or vim.fn.get(vim.fn.get(branch_info, pwd, {}), 'last_update_done', 0) - >= vim.fn.localtime() - 1 + <= vim.fn.localtime() - 1 then local jobid = job.start(cmd, { on_stdout = on_stdout_show_branch, diff --git a/bundle/vim-zettelkasten/plugin/zettelkasten.lua b/bundle/vim-zettelkasten/plugin/zettelkasten.lua index 16de58f4a..922f61de0 100644 --- a/bundle/vim-zettelkasten/plugin/zettelkasten.lua +++ b/bundle/vim-zettelkasten/plugin/zettelkasten.lua @@ -13,6 +13,10 @@ if vim.fn.exists(":ZkBrowse") == 0 then vim.cmd([[command ZkBrowse :lua _G.zettelkasten.zkbrowse()]]) end +if vim.fn.exists(":ZkListTemplete") == 0 then + vim.cmd([[command ZkListTemplete :Telescope zettelkasten_template]]) +end + _G.zettelkasten = { tagfunc = require("zettelkasten").tagfunc, completefunc = require("zettelkasten").completefunc, diff --git a/config/plugins/neo-tree.vim b/config/plugins/neo-tree.vim index aa588c7dd..97285ec43 100644 --- a/config/plugins/neo-tree.vim +++ b/config/plugins/neo-tree.vim @@ -1,5 +1,4 @@ let s:WIN = SpaceVim#api#import('vim#window') -nnoremap NeoTreeFocusToggle augroup vfinit au! autocmd FileType neo-tree call s:nvim_tree_init() diff --git a/config/plugins/nvim-tree.vim b/config/plugins/nvim-tree.vim index 89597fa6b..3d738ff85 100644 --- a/config/plugins/nvim-tree.vim +++ b/config/plugins/nvim-tree.vim @@ -1,5 +1,4 @@ let s:WIN = SpaceVim#api#import('vim#window') -nnoremap NvimTreeToggle " we can not use this option to disable default key bindings " let g:nvim_tree_disable_default_keybindings = 1 augroup vfinit diff --git a/config/plugins/telescope.nvim-0.1.8.vim b/config/plugins/telescope.nvim-0.1.8.vim index 93c46d457..db5f46b92 100644 --- a/config/plugins/telescope.nvim-0.1.8.vim +++ b/config/plugins/telescope.nvim-0.1.8.vim @@ -5,9 +5,6 @@ lua require('telescope').load_extension('scriptnames') lua require('telescope').load_extension('neoyank') lua require('telescope').load_extension('task') lua require('telescope').load_extension('neomru') -if SpaceVim#layers#isLoaded('zettelkasten') - lua require('telescope').load_extension('zettelkasten_template') -endif if SpaceVim#layers#isLoaded('tools') lua require('telescope').load_extension('bookmarks') endif diff --git a/config/plugins/vim-startify.vim b/config/plugins/vim-startify.vim index 62aad6457..bb4ece64b 100644 --- a/config/plugins/vim-startify.vim +++ b/config/plugins/vim-startify.vim @@ -60,6 +60,10 @@ augroup END if !exists('g:startify_custom_header') call s:update_logo() endif + +if !has_key(g:_spacevim_mappings_space, 'a') + let g:_spacevim_mappings_space.a = {'name' : '+Applications'} +endif call SpaceVim#mapping#space#def('nnoremap', ['a','s'], 'call SpaceVim#plugins#history#savepos() | Startify | doautocmd WinEnter', 'fancy start screen',1) if g:spacevim_enable_tabline_ft_icon || get(g:, 'spacevim_enable_tabline_filetype_icon', 0) diff --git a/config/plugins/vim-zettelkasten.vim b/config/plugins/vim-zettelkasten.vim new file mode 100644 index 000000000..53567d746 --- /dev/null +++ b/config/plugins/vim-zettelkasten.vim @@ -0,0 +1,3 @@ +if SpaceVim#layers#isLoaded('zettelkasten') + lua require('telescope').load_extension('zettelkasten_template') +endif diff --git a/config/plugins_before/defx.vim b/config/plugins_before/defx.vim deleted file mode 100644 index 60eaf2269..000000000 --- a/config/plugins_before/defx.vim +++ /dev/null @@ -1,2 +0,0 @@ -nnoremap :Defx - diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index 84ff9fcbf..d0b9be0f4 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -58,44 +58,45 @@ CONTENTS *SpaceVim-contents* 36. filetree_direction.............. |SpaceVim-options-filetree_direction| 37. guifont.................................... |SpaceVim-options-guifont| 38. home_files_number................ |SpaceVim-options-home_files_number| - 39. info_symbol............................ |SpaceVim-options-info_symbol| - 40. keep_server_alive................ |SpaceVim-options-keep_server_alive| - 41. language.................................. |SpaceVim-options-language| - 42. leader_guide_theme.............. |SpaceVim-options-leader_guide_theme| - 43. lint_engine............................ |SpaceVim-options-lint_engine| - 44. lint_on_the_fly.................... |SpaceVim-options-lint_on_the_fly| - 45. max_column.............................. |SpaceVim-options-max_column| - 46. plugin_bundle_dir................ |SpaceVim-options-plugin_bundle_dir| - 47. plugin_manager_processes.. |SpaceVim-options-plugin_manager_processes| - 48. project_auto_root................ |SpaceVim-options-project_auto_root| - 49. project_non_root.................. |SpaceVim-options-project_non_root| - 50. project_rooter_outermost.. |SpaceVim-options-project_rooter_outermost| - 51. project_rooter_patterns.... |SpaceVim-options-project_rooter_patterns| - 52. projects_cache_num.............. |SpaceVim-options-projects_cache_num| - 53. realtime_leader_guide........ |SpaceVim-options-realtime_leader_guide| - 54. relativenumber...................... |SpaceVim-options-relativenumber| - 55. retry_cnt................................ |SpaceVim-options-retry_cnt| - 56. search_tools.......................... |SpaceVim-options-search_tools| - 57. sidebar_width........................ |SpaceVim-options-sidebar_width| - 58. snippet_engine...................... |SpaceVim-options-snippet_engine| - 59. src_root.................................. |SpaceVim-options-src_root| - 60. statusline_iseparator........ |SpaceVim-options-statusline_iseparator| - 61. statusline_left.................... |SpaceVim-options-statusline_left| - 62. statusline_right.................. |SpaceVim-options-statusline_right| - 63. statusline_separator.......... |SpaceVim-options-statusline_separator| - 64. statusline_unicode.............. |SpaceVim-options-statusline_unicode| - 65. terminal_cursor_shape........ |SpaceVim-options-terminal_cursor_shape| - 66. todo_close_list......................... |SpaceVim-options-close_list| - 67. todo_labels............................ |SpaceVim-options-todo_labels| - 68. todo_prefix............................ |SpaceVim-options-todo_prefix| - 69. vim_help_language................ |SpaceVim-options-vim_help_language| - 70. vimcompatible........................ |SpaceVim-options-vimcompatible| - 71. warning_symbol...................... |SpaceVim-options-warning_symbol| - 72. wildignore.............................. |SpaceVim-options-wildignore| - 73. windisk_encoding.................. |SpaceVim-options-windisk_encoding| - 74. windows_index_type.............. |SpaceVim-options-windows_index_type| - 75. windows_leader...................... |SpaceVim-options-windows_leader| - 76. windows_smartclose.............. |SpaceVim-options-windows_smartclose| + 39. if_ruby.................................... |SpaceVim-options-if_ruby| + 40. info_symbol............................ |SpaceVim-options-info_symbol| + 41. keep_server_alive................ |SpaceVim-options-keep_server_alive| + 42. language.................................. |SpaceVim-options-language| + 43. leader_guide_theme.............. |SpaceVim-options-leader_guide_theme| + 44. lint_engine............................ |SpaceVim-options-lint_engine| + 45. lint_on_the_fly.................... |SpaceVim-options-lint_on_the_fly| + 46. max_column.............................. |SpaceVim-options-max_column| + 47. plugin_bundle_dir................ |SpaceVim-options-plugin_bundle_dir| + 48. plugin_manager_processes.. |SpaceVim-options-plugin_manager_processes| + 49. project_auto_root................ |SpaceVim-options-project_auto_root| + 50. project_non_root.................. |SpaceVim-options-project_non_root| + 51. project_rooter_outermost.. |SpaceVim-options-project_rooter_outermost| + 52. project_rooter_patterns.... |SpaceVim-options-project_rooter_patterns| + 53. projects_cache_num.............. |SpaceVim-options-projects_cache_num| + 54. realtime_leader_guide........ |SpaceVim-options-realtime_leader_guide| + 55. relativenumber...................... |SpaceVim-options-relativenumber| + 56. retry_cnt................................ |SpaceVim-options-retry_cnt| + 57. search_tools.......................... |SpaceVim-options-search_tools| + 58. sidebar_width........................ |SpaceVim-options-sidebar_width| + 59. snippet_engine...................... |SpaceVim-options-snippet_engine| + 60. src_root.................................. |SpaceVim-options-src_root| + 61. statusline_iseparator........ |SpaceVim-options-statusline_iseparator| + 62. statusline_left.................... |SpaceVim-options-statusline_left| + 63. statusline_right.................. |SpaceVim-options-statusline_right| + 64. statusline_separator.......... |SpaceVim-options-statusline_separator| + 65. statusline_unicode.............. |SpaceVim-options-statusline_unicode| + 66. terminal_cursor_shape........ |SpaceVim-options-terminal_cursor_shape| + 67. todo_close_list......................... |SpaceVim-options-close_list| + 68. todo_labels............................ |SpaceVim-options-todo_labels| + 69. todo_prefix............................ |SpaceVim-options-todo_prefix| + 70. vim_help_language................ |SpaceVim-options-vim_help_language| + 71. vimcompatible........................ |SpaceVim-options-vimcompatible| + 72. warning_symbol...................... |SpaceVim-options-warning_symbol| + 73. wildignore.............................. |SpaceVim-options-wildignore| + 74. windisk_encoding.................. |SpaceVim-options-windisk_encoding| + 75. windows_index_type.............. |SpaceVim-options-windows_index_type| + 76. windows_leader...................... |SpaceVim-options-windows_leader| + 77. windows_smartclose.............. |SpaceVim-options-windows_smartclose| 3. Configuration............................................ |SpaceVim-config| 4. Commands............................................... |SpaceVim-commands| 5. Public functions...................................... |SpaceVim-functions| @@ -801,6 +802,12 @@ Change the list number of files for SpaceVim home. Default is 6. home_files_number = 6 < +============================================================================== +IF_RUBY *SpaceVim-options-if_ruby* + +Neovim if_ruby provider is too slow, If you are sure that your nvim does not +support ruby, set this option to false. default is true. + ============================================================================== INFO_SYMBOL *SpaceVim-options-info_symbol* diff --git a/init.vim b/init.vim index 2f1a07615..2ac38f2e4 100644 --- a/init.vim +++ b/init.vim @@ -63,7 +63,12 @@ call SpaceVim#begin() call SpaceVim#custom#load() -call SpaceVim#default#keyBindings() +if has('timers') + call timer_start(300, 'SpaceVim#default#keyBindings') +else + call SpaceVim#default#keyBindings() +endif + call SpaceVim#end() diff --git a/lua/spacevim/plugin/tabline.lua b/lua/spacevim/plugin/tabline.lua index 56b66bdc3..0c0c9d6b9 100644 --- a/lua/spacevim/plugin/tabline.lua +++ b/lua/spacevim/plugin/tabline.lua @@ -320,6 +320,13 @@ function M.enable() isep = iseps[1] right_sep = seps[1] left_sep = seps[2] + for bufnr = 1, vim.fn.bufnr('$') do + if + vim.api.nvim_buf_is_valid(bufnr) and vim.api.nvim_buf_get_option(bufnr, 'buflisted') + then + table.insert(visiable_bufs, bufnr) + end + end local tabline_augroup = vim.api.nvim_create_augroup('spacevim_tabline', { clear = true }) vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufReadPost' }, { callback = vim.schedule_wrap(function(event)