mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 10:20:05 +08:00
Update core
layer (#4467)
This commit is contained in:
parent
513a682963
commit
68e123447a
@ -403,11 +403,11 @@ let g:spacevim_enable_ycm = 0
|
||||
" @section sidebar_width, options-sidebar_width
|
||||
" @parentsection options
|
||||
" Set the width of the SpaceVim sidebar. Default is 30.
|
||||
" This value will be used by tagbar and vimfiler.
|
||||
" This value will be used by tagbar and filetree.
|
||||
|
||||
""
|
||||
" Set the width of the SpaceVim sidebar. Default is 30.
|
||||
" This value will be used by tagbar and vimfiler.
|
||||
" This value will be used by tagbar and filetree.
|
||||
let g:spacevim_sidebar_width = 30
|
||||
|
||||
""
|
||||
|
@ -5,6 +5,8 @@
|
||||
" URL: https://spacevim.org
|
||||
" License: GPLv3
|
||||
"=============================================================================
|
||||
scriptencoding utf-8
|
||||
|
||||
|
||||
if exists('s:string_hi')
|
||||
finish
|
||||
@ -13,6 +15,10 @@ endif
|
||||
let s:enable_smooth_scrolling = 1
|
||||
|
||||
|
||||
" disabel netrw
|
||||
let g:loaded_netrwPlugin = 1
|
||||
|
||||
|
||||
let s:SYS = SpaceVim#api#import('system')
|
||||
let s:FILE = SpaceVim#api#import('file')
|
||||
let s:MESSAGE = SpaceVim#api#import('vim#message')
|
||||
@ -935,18 +941,37 @@ endfunction
|
||||
|
||||
|
||||
let g:_spacevim_filetree_show_hidden_files = 0
|
||||
let g:_spacevim_filetree_opened_icon = '▼'
|
||||
let g:_spacevim_filetree_closed_icon = '▶'
|
||||
|
||||
function! SpaceVim#layers#core#set_variable(var) abort
|
||||
|
||||
let g:_spacevim_filetree_show_hidden_files = get(a:var,
|
||||
\ 'filetree_show_hidden',
|
||||
\ g:_spacevim_filetree_show_hidden_files)
|
||||
let g:_spacevim_filetree_opened_icon = get(a:var,
|
||||
\ 'filetree_opened_icon',
|
||||
\ g:_spacevim_filetree_opened_icon)
|
||||
let g:_spacevim_filetree_closed_icon = get(a:var,
|
||||
\ 'filetree_closed_icon',
|
||||
\ g:_spacevim_filetree_closed_icon)
|
||||
let s:enable_smooth_scrolling = get(a:var,
|
||||
\ 'enable_smooth_scrolling',
|
||||
\ s:enable_smooth_scrolling)
|
||||
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#core#get_options() abort
|
||||
|
||||
return [
|
||||
\ 'filetree_closed_icon',
|
||||
\ 'filetree_opened_icon',
|
||||
\ 'filetree_show_hidden',
|
||||
\ 'enable_smooth_scrolling'
|
||||
\ ]
|
||||
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#core#health() abort
|
||||
call SpaceVim#layers#core#plugins()
|
||||
call SpaceVim#layers#core#config()
|
||||
|
@ -6,11 +6,12 @@ if get(g:, 'spacevim_filetree_direction', 'right') ==# 'right'
|
||||
else
|
||||
let g:NERDTreeWinPos = 'left'
|
||||
endif
|
||||
let g:NERDTreeWinSize=get(g:,'NERDTreeWinSize',31)
|
||||
let g:NERDTreeWinSize=get(g:,'NERDTreeWinSize', get(g:, 'spacevim_sidebar_width', 35))
|
||||
let g:NERDTreeChDirMode=get(g:,'NERDTreeChDirMode',1)
|
||||
let g:NERDTreeShowHidden = get(g:, '_spacevim_filetree_show_hidden_files', 0)
|
||||
let g:NERDTreeDirArrowExpandable = '▶'
|
||||
let g:NERDTreeDirArrowCollapsible = '▼'
|
||||
let g:NERDTreeDirArrowExpandable = get(g:, 'NERDTreeDirArrowExpandable', get(g:, '_spacevim_filetree_closed_icon', ''))
|
||||
let g:NERDTreeDirArrowCollapsible = get(g:, 'NERDTreeDirArrowCollapsible', get(g:, '_spacevim_filetree_opened_icon', ''))
|
||||
let g:NERDTreeMinimalUI=1
|
||||
augroup nerdtree_zvim
|
||||
autocmd!
|
||||
autocmd bufenter *
|
||||
|
@ -6,8 +6,8 @@ let g:vimfiler_as_default_explorer = get(g:, 'vimfiler_as_default_explorer', 1)
|
||||
let g:vimfiler_restore_alternate_file = get(g:, 'vimfiler_restore_alternate_file', 1)
|
||||
let g:vimfiler_tree_indentation = get(g:, 'vimfiler_tree_indentation', 1)
|
||||
let g:vimfiler_tree_leaf_icon = get(g:, 'vimfiler_tree_leaf_icon', '')
|
||||
let g:vimfiler_tree_opened_icon = get(g:, 'vimfiler_tree_opened_icon', '')
|
||||
let g:vimfiler_tree_closed_icon = get(g:, 'vimfiler_tree_closed_icon', '')
|
||||
let g:vimfiler_tree_opened_icon = get(g:, 'vimfiler_tree_opened_icon', g:_spacevim_filetree_opened_icon)
|
||||
let g:vimfiler_tree_closed_icon = get(g:, 'vimfiler_tree_closed_icon', g:_spacevim_filetree_closed_icon)
|
||||
let g:vimfiler_file_icon = get(g:, 'vimfiler_file_icon', '')
|
||||
let g:vimfiler_readonly_file_icon = get(g:, 'vimfiler_readonly_file_icon', '*')
|
||||
let g:vimfiler_marked_file_icon = get(g:, 'vimfiler_marked_file_icon', '√')
|
||||
|
@ -648,7 +648,7 @@ option to:
|
||||
SIDEBAR_WIDTH *SpaceVim-options-sidebar_width*
|
||||
|
||||
Set the width of the SpaceVim sidebar. Default is 30. This value will be used
|
||||
by tagbar and vimfiler.
|
||||
by tagbar and filetree.
|
||||
|
||||
==============================================================================
|
||||
SNIPPET_ENGINE *SpaceVim-options-snippet_engine*
|
||||
@ -939,7 +939,7 @@ Enable/Disable YouCompleteMe. Default is 0.
|
||||
|
||||
*g:spacevim_sidebar_width*
|
||||
Set the width of the SpaceVim sidebar. Default is 30. This value will be used
|
||||
by tagbar and vimfiler.
|
||||
by tagbar and filetree.
|
||||
|
||||
*g:spacevim_snippet_engine*
|
||||
Set the snippet engine of SpaceVim, default is neosnippet. to enable
|
||||
|
@ -16,18 +16,19 @@ description: "SpaceVim core layer provides many default key bindings and feature
|
||||
|
||||
## Intro
|
||||
|
||||
This is the core layer of SpaceVim, and it is loaded by default.
|
||||
The `core` layer of SpaceVim. This layer is enabled by default, and it provides filetree,
|
||||
comment key bindings etc.
|
||||
|
||||
## Features
|
||||
|
||||
### FileTree
|
||||
|
||||
The filetree plugin is included in core layer, by default `vimfiler` is used as filetree manager.
|
||||
To use nerdtree or defx, please add following snippet into your configuration file.
|
||||
The filetree is included in core layer, by default `nerdtree` is used as filetree manager.
|
||||
To use defx, please add following snippet into your configuration file.
|
||||
|
||||
```toml
|
||||
[options]
|
||||
filemanager = "nerdtree"
|
||||
filemanager = "defx"
|
||||
```
|
||||
|
||||
## Configuration
|
||||
@ -40,5 +41,6 @@ To use nerdtree or defx, please add following snippet into your configuration fi
|
||||
name = 'core'
|
||||
filetree_show_hidden = true
|
||||
enable_smooth_scrolling = true
|
||||
filetree_opened_icon = ''
|
||||
filetree_closed_icon = ''
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user