1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:20:04 +08:00

Update doc

This commit is contained in:
wsdjeg 2017-10-25 10:27:25 +08:00
parent 1ab709de30
commit b10ac4ad4a
3 changed files with 31 additions and 7 deletions

View File

@ -34,7 +34,14 @@ function! SpaceVim#layers#checkers#config() abort
endfunction endfunction
function! s:error_transient_state() abort function! s:error_transient_state() abort
if empty(neomake#statusline#LoclistCounts()) if g:spacevim_enable_neomake
let has_errors = neomake#statusline#LoclistCounts()
elseif g:spacevim_enable_ale
let has_errors = ''
else
let has_errors = ''
endif
if empty(has_errors)
echo 'no buffers contain error message locations' echo 'no buffers contain error message locations'
return return
endif endif
@ -88,7 +95,7 @@ else
endfunction endfunction
endif endif
" TODO clear errors
function! s:clear_errors() abort function! s:clear_errors() abort
sign unplace * sign unplace *
endfunction endfunction

1
config/plugins/ale.vim Normal file
View File

@ -0,0 +1 @@
scriptencoding utf-8

View File

@ -1,17 +1,32 @@
# [Layers](https://spacevim.org/layers) > checkers ---
title: "SpaceVim checkers layer"
---
# [SpaceVim Layers:](https://spacevim.org/layers) checkers
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Configuration](#configuration)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Description
This layer provides syntax checking feature. This layer provides syntax checking feature.
## Install ## Layer Installation
checkers layer is loaded by default. checkers layer is loaded by default.
## options ## Configuration
| Name | default value | description | | Name | default value | description |
| ---------------------------- | ------------- | -------------------------------------------------------- | | ---------------------------- | ------------- | -------------------------------------------------------- |
| `g:spacevim_enable_neomake` | 1 | Use neomake as default checking tools | | `g:spacevim_enable_neomake` | 1 | Use neomake as default checking tools |
| `g:spacevim_enable_ale` | 1 | Use ale as default checking tools | | `g:spacevim_enable_ale` | 0 | Use ale as default checking tools |
| `g:spacevim_lint_on_the_fly` | 0 | Syntax checking on the fly feature, disabled by default. | | `g:spacevim_lint_on_the_fly` | 0 | Syntax checking on the fly feature, disabled by default. |
**NOTE:** if you want to use ale, you need: **NOTE:** if you want to use ale, you need:
@ -23,10 +38,11 @@ let g:spacevim_enable_ale = 1
and if you want to use syntastic, set this two options to 0. and if you want to use syntastic, set this two options to 0.
## Mappings ## Key bindings
| Key | mode | description | | Key | mode | description |
| --------- | ------ | ------------------------------------------------------------ | | --------- | ------ | ------------------------------------------------------------ |
| `SPC e .` | Normal | open error-transient-state |
| `SPC e c` | Normal | clear errors | | `SPC e c` | Normal | clear errors |
| `SPC e h` | Normal | describe current checker | | `SPC e h` | Normal | describe current checker |
| `SPC e n` | Normal | jump to the position of next error | | `SPC e n` | Normal | jump to the position of next error |