mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 10:30:05 +08:00
Add enable_Indentline option for ui layer (#3909)
This commit is contained in:
parent
0004826efe
commit
105ba4edb1
@ -7,13 +7,13 @@
|
||||
"test/plugin/a.vader": { "alternate": "autoload/SpaceVim/plugins/a.vim" },
|
||||
"autoload/SpaceVim/layers/lang/*.vim": { "doc": "docs/layers/lang/{}.md" },
|
||||
"test/api/*.vader": { "alternate": "autoload/SpaceVim/api/{}.vim" },
|
||||
"docs/layers/lang/*.md": {
|
||||
"alternate": "docs/cn/layers/lang/{}.md",
|
||||
"code": "autoload/SpaceVim/layers/lang/{}.vim"
|
||||
"docs/layers/*.md": {
|
||||
"alternate": "docs/cn/layers/{}.md",
|
||||
"code": "autoload/SpaceVim/layers/{}.vim"
|
||||
},
|
||||
"docs/cn/layers/lang/*.md": {
|
||||
"alternate": "docs/layers/lang/{}.md",
|
||||
"code": "autoload/SpaceVim/layers/lang/{}.vim"
|
||||
"docs/cn/layers/*.md": {
|
||||
"alternate": "docs/layers/{}.md",
|
||||
"code": "autoload/SpaceVim/layers/{}.vim"
|
||||
},
|
||||
"docs/*.md": { "alternate": "docs/cn/{}.md" },
|
||||
"docs/cn/*.md": { "alternate": "docs/{}.md" },
|
||||
|
@ -13,6 +13,7 @@ if exists('s:enable_sidebar')
|
||||
else
|
||||
let s:enable_sidebar = 0
|
||||
let s:enable_scrollbar = 0
|
||||
let s:enable_indentline = 1
|
||||
endif
|
||||
|
||||
function! SpaceVim#layers#ui#plugins() abort
|
||||
@ -44,6 +45,7 @@ function! SpaceVim#layers#ui#config() abort
|
||||
let g:indentLine_char = get(g:, 'indentLine_char', '┊')
|
||||
let g:indentLine_concealcursor = 'niv'
|
||||
let g:indentLine_conceallevel = 2
|
||||
let g:indentLine_enabled = s:enable_indentline
|
||||
let g:indentLine_fileTypeExclude = ['help', 'man', 'startify', 'vimfiler', 'json']
|
||||
let g:better_whitespace_filetypes_blacklist = ['diff', 'gitcommit', 'unite',
|
||||
\ 'qf', 'help', 'markdown', 'leaderGuide',
|
||||
@ -426,6 +428,9 @@ function! SpaceVim#layers#ui#set_variable(var) abort
|
||||
let s:enable_scrollbar = get(a:var,
|
||||
\ 'enable_scrollbar',
|
||||
\ 0)
|
||||
let s:enable_indentline = get(a:var,
|
||||
\ 'enable_indentline',
|
||||
\ 1)
|
||||
|
||||
endfunction
|
||||
|
||||
|
@ -11,7 +11,6 @@ lang: zh
|
||||
- [模块描述](#模块描述)
|
||||
- [启用模块](#启用模块)
|
||||
- [模块选项](#模块选项)
|
||||
- [集成插件](#集成插件)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
@ -31,10 +30,4 @@ SpaceVim ui 模块提供了一个 IDE-like 的界面,包括状态栏、文件
|
||||
## 模块选项
|
||||
|
||||
- `enable_scrollbar`:启用/禁用悬浮滚动条,默认为禁用的,该功能需要 Neovim 的悬浮窗口支持。
|
||||
|
||||
|
||||
## 集成插件
|
||||
|
||||
- [mhinz/vim-startify](https://github.com/mhinz/vim-startify)
|
||||
- [majutsushi/tagbar](https://github.com/majutsushi/tagbar)
|
||||
|
||||
- `enable_indentline`: 启用/禁用对齐线,默认为启用的。
|
||||
|
@ -10,8 +10,6 @@ description: "Awesome UI layer for SpaceVim, provide IDE-like UI for neovim and
|
||||
- [Description](#description)
|
||||
- [Install](#install)
|
||||
- [Layer Options](#layer-options)
|
||||
- [Plugins](#plugins)
|
||||
- [Tips](#tips)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
@ -32,30 +30,4 @@ To use this configuration layer, update custom configuration file with:
|
||||
|
||||
- `enable_scrollbar`: Enable/disable floating scrollbar of current buffer. Disabled by default.
|
||||
This feature requires neovim's floating window.
|
||||
|
||||
|
||||
|
||||
|
||||
## Plugins
|
||||
|
||||
- [startify](https://github.com/mhinz/vim-startify): welcome page, default key binding is `SPC a s`.
|
||||
- [tagbar](https://github.com/majutsushi/tagbar): outline sidebar, default key binding is `<F2>`.
|
||||
- [indentLine](https://github.com/Yggdroot/indentLine): code indent line, toggle key binding is `SPC t i`.
|
||||
|
||||
## Tips
|
||||
|
||||
SpaceVim provide default statusline and tabline plugin which are provided by `core#statusline` and `core#tabline` layer, If you want to use airline, just disable that layer:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "core#statusline"
|
||||
enable = false
|
||||
```
|
||||
|
||||
Use sidebar to manager file tree and outline:
|
||||
|
||||
```toml
|
||||
[[layers]]
|
||||
name = "ui"
|
||||
enable_sidebar = true
|
||||
```
|
||||
- `enable_indentline`: Enable/disable indentline of current buffer. Enabled by default.
|
||||
|
Loading…
Reference in New Issue
Block a user