mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 13:20:05 +08:00
complete options
This commit is contained in:
parent
174fac5c93
commit
53de7fce0d
@ -7,13 +7,13 @@ title: "SpaceVim autocomplete layer"
|
|||||||
<!-- vim-markdown-toc GFM -->
|
<!-- vim-markdown-toc GFM -->
|
||||||
* [Description](#description)
|
* [Description](#description)
|
||||||
* [Install](#install)
|
* [Install](#install)
|
||||||
* [Key Mappings](#key-mappings)
|
* [Configuration](#configuration)
|
||||||
|
* [Key bindings](#key-bindings)
|
||||||
|
|
||||||
<!-- vim-markdown-toc -->
|
<!-- vim-markdown-toc -->
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
|
|
||||||
This layer provides auto-completion to SpaceVim.
|
This layer provides auto-completion to SpaceVim.
|
||||||
|
|
||||||
The following completion engines are supported:
|
The following completion engines are supported:
|
||||||
@ -33,4 +33,22 @@ To use this configuration layer, add it to your custom configuration file.
|
|||||||
call SpaceVim#layers#load('autocomplete')
|
call SpaceVim#layers#load('autocomplete')
|
||||||
```
|
```
|
||||||
|
|
||||||
## Key Mappings
|
## 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
|
||||||
|
2. `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
|
||||||
|
3. `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.
|
||||||
|
4. `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:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user