1
1
*completion-nvim.txt*
2
- A async completion framework aims to provide completion to neovim's built in
3
- LSP written in Lua
2
+ Async completion framework that aims to provide completion for neovim's
3
+ built-in LSP, written in Lua.
4
4
5
5
6
6
CONTENTS *completion-nvim*
@@ -12,14 +12,14 @@ CONTENTS *completion-nvim*
12
12
3. Options .............. | completion-option |
13
13
14
14
==============================================================================
15
- INTRODUCTION *completion-introdction *
15
+ INTRODUCTION *completion-introduction *
16
16
17
17
completion-nvim is an auto completion framework that aims to provide a better
18
18
completion experience with neovim's built-in LSP. Other LSP functionality is
19
19
not supported.
20
20
21
21
==============================================================================
22
- FEATURE *completion-features*
22
+ FEATURES *completion-features*
23
23
24
24
- Asynchronous completion using libuv api.
25
25
- Automatically open hover windows when popupmenu is available.
@@ -74,7 +74,6 @@ g:completion_enable_auto_popup *g:completion_enable_auto_popup*
74
74
imap <tab> <Plug>(completion_smart_tab)
75
75
imap <s-tab> <Plug>(completion_smart_s_tab)
76
76
<
77
-
78
77
default value: 1
79
78
80
79
g:completion_enable_snippet *g:completion_enable_snippet*
@@ -97,12 +96,11 @@ g:completion_confirm_key *g:completion_confirm_key*
97
96
" Change confirm key to <C-y>
98
97
let g:completion_confirm_key = "\<C-y>"
99
98
<
100
-
101
99
default value: "\<CR> "
102
100
103
- If the confirm key has a fallback mapping, for example when using the auto
104
- pairs plugin, it maps to `<cr> ` . you can avoid using the default confirm key
105
- option and use a mapping like this instead.
101
+ If the confirm key has a fallback mapping, for example when using the
102
+ auto pairs plugin, it maps to `<cr> ` . You can avoid using the default
103
+ confirm key option and use a mapping like this instead:
106
104
>
107
105
let g:completion_confirm_key = ""
108
106
imap <expr> <cr> pumvisible() ? complete_info()["selected"] != "-1" ?
@@ -120,8 +118,8 @@ g:completion_enable_auto_hover *g:completion_enable_auto_hover*
120
118
121
119
g:completion_enable_auto_signature *g:completion_enable_auto_signature*
122
120
123
- By default signature help opens automatically whenever it is availabe.
124
- You can turn it off by setting this option to zero.
121
+ By default signature help opens automatically whenever it is
122
+ available. You can turn it off by setting this option to zero.
125
123
126
124
default value: 1
127
125
@@ -133,38 +131,39 @@ g:completion_enable_auto_paren *g:completion_enable_auto_paren*
133
131
default value: 0
134
132
135
133
g:completion_trigger_character *g:completion_trigger_character*
134
+
136
135
You can add or disable a trigger character that will trigger
137
136
completion.
138
137
139
- For example, disable trigger character
138
+ For example, disable trigger character:
140
139
>
141
140
let g:completion_trigger_character = []
142
141
<
143
- Or having multiple trigger characters
142
+ Or having multiple trigger characters:
144
143
>
145
144
let g:completion_trigger_character = ['.', '::']
146
145
<
147
146
Use an autocmd if you want a different trigger character for different
148
- lanugages.
147
+ languages:
149
148
>
150
149
augroup CompletionTriggerCharacter
151
150
autocmd!
152
151
autocmd BufEnter * let g:completion_trigger_character = ['.']
153
152
autocmd BufEnter *.c,*.cpp let g:completion_trigger_character = ['.', '::']
154
153
augroup end
155
154
<
156
-
157
155
default value: ['.']
158
156
159
157
g:completion_enable_server_trigger *g:completion_enable_server_trigger*
160
158
161
- Wether or not to use the trigger characters provided by language
162
- server for triggering the popup menu.
159
+ Whether or not to use the trigger characters provided by the language
160
+ server for triggering the popup menu.
161
+
163
162
You can turn it off by setting this option to zero.
164
163
165
164
default value: 1
166
165
167
- g:completion_trigger_keyword_length *g:completion_trigger_keyword_length*
166
+ g:completion_trigger_keyword_length *g:completion_trigger_keyword_length*
168
167
169
168
You can specify keyword length for triggering completion, if the
170
169
current word is less than keyword length, completion won't be
@@ -175,17 +174,13 @@ g:completion_trigger_keyword_length *g:completion_trigger_keyword_length*
175
174
176
175
default value: 1
177
176
177
+ g:completion_trigger_on_delete *g:completion_trigger_on_delete*
178
178
179
- g:completion_trigger_on_delete *g:completion_trigger_on_delete*
180
-
181
-
182
- completion-nvim doesn't trigger completion on delete by default because
183
- sometimes I've found it annoying. However, you can enable it by
179
+ completion-nvim doesn't trigger completion on delete by default,
180
+ as this can be a nuisance. However, you can enable it via:
184
181
>
185
182
let g:completion_trigger_on_delete = 1
186
183
<
187
-
188
-
189
184
g:completion_timer_cycle *g:completion_timer_cycle*
190
185
191
186
completion-nvim uses a timer to control the rate of completion. Adjust
@@ -201,8 +196,8 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
201
196
vim-mucomplete. In short, you can divide completion sources in groups
202
197
and have an ins-completion method as backup completion.
203
198
204
- You can specify different completion list for different filetypes. By
205
- default, possible sources are 'lsp' , 'snippet' , 'path' and various
199
+ You can specify different completion list for different filetypes.
200
+ By default, possible sources are 'lsp' , 'snippet' , 'path' and various
206
201
ins-complete sources. Specify 'mode' as your key for ins-complete
207
202
sources, 'complete_items' for other sources. For example:
208
203
>
@@ -244,7 +239,6 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
244
239
"Neosnippet": neosnippet source
245
240
"vim-vsnip": vim-vsnip source
246
241
<
247
-
248
242
For ins-complete sources, possible 'mode' to the actual key in vim are
249
243
listed below.
250
244
>
@@ -266,7 +260,6 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
266
260
<
267
261
You can also specify different completion lists for different
268
262
filetypes, for example:
269
-
270
263
>
271
264
let g:completion_chain_complete_list = {
272
265
\ 'vim': [
@@ -312,7 +305,7 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
312
305
<
313
306
For every completion source, you can specify `triggered_only` key.
314
307
This completion source will only trigger when this key is press. For
315
- example
308
+ example:
316
309
>
317
310
let g:completion_chain_complete_list = {
318
311
\ 'default' : {
@@ -325,15 +318,14 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
325
318
\ }
326
319
\}
327
320
<
328
-
329
321
Note: Every syntax highlighter has a different syntax name
330
322
defined(most of them are similar though). You can check your syntax
331
323
name under your cursor by this command:
332
324
>
333
325
:echo synIDattr(synID(line('.'), col('.'), 1), "name")
334
326
<
335
327
You just need to specify a part of a result in the scope since it uses
336
- a regex pattern to match it ( For example: if the result is 'luaComment'
328
+ a regex pattern to match it (For example: if the result is 'luaComment'
337
329
you only need to specified 'comment' , case doesn't matter).
338
330
339
331
g:completion_auto_change_source *g:completion_auto_change_source*
@@ -346,17 +338,17 @@ g:completion_auto_change_source *g:completion_auto_change_source*
346
338
g:completion_matching_strategy_list *g:completion_matching_strategy_list*
347
339
348
340
There are three different kind of matching technique implement in
349
- completion-nvim: 'substring' , 'fuzzy' , 'exact' or 'all' . You can specify a list
350
- of matching strategy, completion-nvim will loop through the list and
351
- assign priority from high to low. For example
341
+ completion-nvim: 'substring' , 'fuzzy' , 'exact' or 'all' . You can
342
+ specify a list of matching strategy, completion-nvim will loop through
343
+ the list and assign priority from high to low. For example:
352
344
>
353
345
let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy', 'all']
354
346
<
355
347
default value: ['exact' ]
356
348
357
349
g:completion_matching_ignore_case *g:completion_matching_ignore_case*
358
350
359
- Enable ignore case matching in all matching strategy. For example
351
+ Enable ignore case matching in all matching strategy. For example:
360
352
>
361
353
let g:completion_matching_ignore_case = 1
362
354
<
0 commit comments