Back to Spacevim

SpaceVim checkers layer

docs/layers/checkers.md

2.4.03.4 KB
Original Source

Available Layers >> checkers

<!-- vim-markdown-toc GFM --> <!-- vim-markdown-toc -->

Description

This layer provides syntax checking feature.

Install

To use this configuration layer, add following snippet to your custom configuration file. This layer is enabled by default.

toml
[[layers]]
  name = "checkers"

Configuration

The checkers layer is loaded by default, there are two kinds options for this layer: global options and layer options.

Global options:

All of the SpaceVim global options should be put into the [options] section.

Namedefault valuedescription
lint_engineneomakeSet the lint engine

The default lint engine is neomake, you can also use ale or syntastic.

If you want to configure neomake, you can use bootstrap functions. Within bootstrap functions, you can use vim script. For all the info about neomake configuration, please checkout :h neomake.

Layer options:

By default, the error will be displayed below the current line, if you want to disabled this feature, you may need to load this layer with show_cursor_error to false.

Namedefault valuedescription
lint_on_the_flyfalseSyntax checking on the fly feature, disabled by default.
lint_on_savetrueRun syntax checking when saving a file.
show_cursor_errortrueEnable/Disable displaying error below current line.
lint_exclude_filetype[]Set the filetypes which does not enable syntax checking.
open_error_list1/2/0Open the language checking windows. Defaults to 2
toml
[[layers]]
  name = "checkers"
  show_cursor_error = false

Key bindings

Keymodedescription
SPC e .Normalopen error-transient-state
SPC e cNormalclear errors
SPC e hNormaldescribe current checker
SPC e nNormaljump to the position of next error
SPC e NNormaljump to the position of previous error
SPC e pNormaljump to the position of previous error
SPC e lNormaldisplay a list of all the errors
SPC e LNormaldisplay a list of all the errors and focus the errors buffer
SPC e eNormalexplain the error at point
SPC e sNormalset syntax checker (TODO)
SPC e SNormalset syntax checker executable (TODO)
SPC e vNormalverify syntax setup
SPC t sNormaltoggle syntax