1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-23 17:49:57 +08:00
SpaceVim/docs/layers/autocomplete.md
2017-07-30 07:15:13 +08:00

2.1 KiB

title
SpaceVim autocomplete layer

SpaceVim Layers: autocomplete

Description

This layer provides auto-completion to SpaceVim.

The following completion engines are supported:

Snippets are supported via neosnippet.

Install

To use this configuration layer, add it to your custom configuration file.

call SpaceVim#layers#load('autocomplete')

Configuration

Key bindings

You can customize the user experience of auto-completion with the following layer variables:

  1. auto-completion-return-key-behavior set the action to perform when the RET key is pressed, the possible values are:
  • complete completes with the current selection
  • nil does nothing
  1. auto-completion-tab-key-behavior set the action to perform when the TAB key is pressed, the possible values are:
  • smart cycle candidates, expand snippets, jump parameters
  • complete completes with the current selection
  • cycle completes the common prefix and cycle between candidates
  • nil does nothing
  1. auto-completion-complete-with-key-sequence is a string of two characters denoting a key sequence that will perform a complete action if the sequence as been entered quickly enough. If its value is nil then the feature is disabled.
  2. auto-completion-complete-with-key-sequence-delay is the number of seconds to wait for the auto-completion key sequence to be entered. The default value is 0.1 seconds.

The default configuration of the layer is: