11*completion-nvim.txt*
2- A async completion framework aims to provide completion to neovim's built in LSP written in Lua
2+ A async completion framework aims to provide completion to neovim's built in
3+ LSP written in Lua
34
45
5- CONTENTS *completion-nvim*
6+ CONTENTS *completion-nvim*
67
78 0. Introduction ......... | completion-introduction |
89 1. Features ............. | completion-feature |
9- 1. Prerequisite .......... | completion-prerequisite |
10+ 1. Prerequisite ......... | completion-prerequisite |
1011 2. Setup ................ | completion-setup |
1112 3. Options .............. | completion-option |
1213
13- ===============================================================================================
14- INTRODUCTION *completion-introdction*
14+ ==============================================================================
15+ INTRODUCTION *completion-introdction*
1516
1617completion-nvim is an auto completion framework that aims to provide a better
17- completion experience with neovim's built-in LSP. Other LSP functionality is not
18- supported.
18+ completion experience with neovim's built-in LSP. Other LSP functionality is
19+ not supported.
1920
20- ===============================================================================================
21- FEATURE *completion-features*
21+ ==============================================================================
22+ FEATURE *completion-features*
2223
2324- Asynchronous completion using libuv api.
2425- Automatically open hover windows when popupmenu is available.
@@ -27,41 +28,41 @@ FEATURE *completion-features
2728- ins-complete method integration
2829- Chain completion support inspired by vim-mucomplete
2930
30- ==============================================================================================
31- PREREQUISITES *completion-prerequisites*
31+ ==============================================================================
32+ PREREQUISITES *completion-prerequisites*
3233
3334- Neovim 5.0
3435- You should be setting up language server with the help of nvim-lsp
3536
36- ===============================================================================================
37+ ==============================================================================
3738SETUP *completion-setup*
3839
39- - completion-nvim require several autocommand set up to work properly, you should
40- set it up using the `on_attach` function like this.
40+ - completion-nvim requires several autocommands set up to work properly, you
41+ should set it up using the `on_attach` function like this.
4142 >
4243 lua require'nvim_lsp'.pyls.setup{on_attach=require'completion'.on_attach}
4344
4445 - Change `pyls` to whichever language server you are using.
4546
46- - If you want completion-nvim to be set up for all buffers instead of only being
47- used when lsp is enabled, call the `on_attach` function directly:
47+ - If you want completion-nvim to be set up for all buffers instead of only
48+ being used when lsp is enabled, call the `on_attach` function directly:
4849>
4950 " Use completion-nvim in every buffer
5051 autocmd BufEnter * lua require'completion'.on_attach()
5152<
5253 Note: It's okay to set up completion-nvim without lsp. It will simply use
5354 another completion source instead(Ex: snippets).
5455
55- ===============================================================================================
56- OPTION *completion-option*
56+ ==============================================================================
57+ OPTION *completion-option*
5758
58- g:completion_enable_auto_popup *g:completion_enable_auto_popup*
59+ g:completion_enable_auto_popup *g:completion_enable_auto_popup*
5960
60- This variable enable automatically popup window for completion. Set
61- this value to 0 if you don't want automatically popup window.
61+ This variable enable automatically popup window for completion. Set
62+ this value to 0 if you don't want automatically popup window.
6263
63- If you disable auto popup menu, you can manually trigger completion by
64- mapping keys. For example:
64+ If you disable auto popup menu, you can manually trigger completion by
65+ mapping keys. For example:
6566>
6667 " map <c-p> to manually trigger completion
6768 inoremap <silent><expr> <c-p> completion#trigger_completion()
@@ -82,22 +83,22 @@ g:completion_enable_auto_popup *g:completion_enable_auto_popup*
8283
8384 default value: 1
8485
85- g:completion_enable_snippet *g:completion_enable_snippet*
86+ g:completion_enable_snippet *g:completion_enable_snippet*
8687
87- You can specify what snippet engines you want to use. Possible value
88+ You can specify which snippet engines you want to use. Possible values
8889 are | UltiSnips | and | Neosnippet | .
8990
90- Note: Snippets engine will not work without setting this variables.
91+ Note: Snippet engines will not work without setting this variables.
9192
9293 default value: v:null
9394
94- g:completion_confirm_key *g:completion_confirm_key*
95+ g:completion_confirm_key *g:completion_confirm_key*
9596
96- You can specify what keys to use for confirm completion(which will
97+ You can specify which keys to use for confirm completion(which will
9798 select the completion items and expand snippets if available).
9899
99- Note: Make sure to use proper escape sequence to avoid parsing issue,
100- for example:
100+ Note: Make sure to use a proper escape sequence to avoid parsing
101+ issues, for example:
101102>
102103 " Change confirm key to <C-y>
103104 let g:completion_confirm_key = "\<C-y>"
@@ -107,49 +108,50 @@ g:completion_confirm_key *g:completion_confirm_key*
107108
108109g:completion_confirm_key_rhs *g:completion_confirm_key_rhs*
109110
110- If the confirm key have a fallback mapping, for example, using auto
111- pair plugins that map to "\<CR> ", you can provide it like it in this
112- options. For example:
111+ If the confirm key has a fallback mapping, for example, using auto
112+ pair plugins that map to "\<CR> ", you can provide it like it in this
113+ options. For example:
113114>
114- " Fallback for https://github.com/Raimondi/delimitMate expanding on enter
115- let g:completion_confirm_key_rhs = "\<Plug>delimitMateCR"
115+ " Fallback for https://github.com/Raimondi/delimitMate expanding on
116+ enter let g:completion_confirm_key_rhs = "\<Plug>delimitMateCR"
116117<
117- g:completion_enable_auto_hover *g:completion_enable_auto_hover*
118+ g:completion_enable_auto_hover *g:completion_enable_auto_hover*
118119
119- By default, completion-nvim will automatically open up hover window
120- when you navigate through the complete items(including basic
121- information of snippets). You can turn it off by specify this option
122- to zero.
120+ By default, completion-nvim will automatically open a hover window
121+ when you navigate through the complete items(including basic
122+ information of snippets). You can turn this off by setting this option
123+ to zero.
123124
124125 default value: 1
125126
126- g:completion_enable_auto_signature *g:completion_enable_auto_signature*
127+ g:completion_enable_auto_signature *g:completion_enable_auto_signature*
127128
128- By default signature help opens automatically whenever it is availabe.
129- You can turn it off by specify this option to zero.
129+ By default signature help opens automatically whenever it is availabe.
130+ You can turn it off by setting this option to zero.
130131
131132 default value: 1
132133
133- g:completion_enable_auto_paren *g:completion_enable_auto_paren*
134+ g:completion_enable_auto_paren *g:completion_enable_auto_paren*
134135
135136 Enable the auto insert parenthesis feature. completion-nvim will
136- insert parenthesis when complete method or functions.
137+ insert parenthesis when completing methods or functions.
137138
138139 default value: 0
139140
140- g:completion_max_items *g:completion_max_items*
141+ g:completion_max_items *g:completion_max_items*
141142
142- You can set a number limit for the maximum completion items. For
143- example, if you just want at most 10 items in your popup menu, set is
144- option equals to 10.
143+ You can set a number limit for the maximum completion items. For
144+ example, if you just want at most 10 items in your popup menu, set is
145+ option equal to 10.
145146
146147 Note: this option only works for non ins-complete sources.
147148
148149 default value: v:null
149150
150151
151- g:completion_trigger_character *g:completion_trigger_character*
152- You can add or disable a trigger character that will trigger completion.
152+ g:completion_trigger_character *g:completion_trigger_character*
153+ You can add or disable a trigger character that will trigger
154+ completion.
153155
154156 For example, disable trigger character
155157>
@@ -159,8 +161,8 @@ g:completion_trigger_character *g:completion_trigger_character*
159161>
160162 let g:completion_trigger_character = ['.', '::']
161163<
162- Use autocmd if you want different trigger character for different
163- lanugages.
164+ Use an autocmd if you want a different trigger character for different
165+ lanugages.
164166>
165167 augroup CompleteionTriggerCharacter
166168 autocmd!
@@ -171,7 +173,7 @@ g:completion_trigger_character *g:completion_trigger_character*
171173
172174 default value: ['.']
173175
174- g:completion_timer_cycle *g:completion_timer_cycle*
176+ g:completion_timer_cycle *g:completion_timer_cycle*
175177
176178 completion-nvim uses a timer to control the rate of completion. Adjust
177179 the timer rate by setting this value.
@@ -180,13 +182,13 @@ g:completion_timer_cycle *g:completion_timer_cycle*
180182
181183 default value: 80
182184
183- g:completion_chain_complete_list *g:completion_chain_complete_list*
185+ g:completion_chain_complete_list *g:completion_chain_complete_list*
184186
185- completion-nvim has chain completion support inspired by vim-mucomplete.
186- In short, you can divide completion sources in group and having
187- ins-completion method as backup completion.
187+ completion-nvim has chain completion support inspired by
188+ vim-mucomplete. In short, you can divide completion sources in groups
189+ and have an ins-completion method as backup completion.
188190
189- You can specify different completion list for different filetype . By
191+ You can specify different completion list for different filetypes . By
190192 default, possible sources are 'lsp' , 'snippet' , 'path' and various
191193 ins-complete sources. Specify 'mode' as your key for ins-complete
192194 sources, 'complete_items' for other sources. For example:
@@ -206,10 +208,10 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
206208 imap <c-j> <cmd>lua require'source'.prevCompletion()<CR>
207209 imap <c-k> <cmd>lua require'source'.nextCompletion()<CR>
208210<
209- Customizing your completion sources is easy, for non ins-complete
211+ Customizing your completion sources is easy. For non ins-complete
210212 items, you can choose to put them in the same source or separate them.
211- For example, if you want to separate lsp and snippet into two different
212- sources:
213+ For example, if you want to separate lsp and snippet into two
214+ different sources:
213215>
214216 let g:completion_chain_complete_list = {
215217 \'default' : [
@@ -238,8 +240,8 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
238240 "thes": i_CTRL-X_CTRL-T
239241 "user": i_CTRL-X_CTRL-U
240242<
241- You can also specify different completion list for different filetype,
242- for example:
243+ You can also specify different completion lists for different
244+ filetypes, for example:
243245
244246>
245247 let g:completion_chain_complete_list = {
@@ -258,10 +260,10 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
258260 \]
259261 \}
260262<
261- You can take a step further to specified different 'scope' of different
262- filetype . 'scope' is literally syntax in your file. Say that you want
263- different completion list in comment and function call, string and etc,
264- you can have it done easily. Here is an example
263+ You can take a step further to specify different 'scope' of different
264+ filetypes . 'scope' is literally syntax in your file. Say that you want
265+ different completion lists in comments and function calls, strings,
266+ etc, you can do that easily. Here is an example
265267>
266268 let g:completion_chain_complete_list = {
267269 \ 'lua': [
@@ -284,17 +286,17 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
284286 \ }
285287 \}
286288<
287- Note: Every syntax highlighter have different syntax name defined(most
288- of them are similar though). You can check your syntax name under your
289- cursor by this command:
289+ Note: Every syntax highlighter has a different syntax name
290+ defined(most of them are similar though). You can check your syntax
291+ name under your cursor by this command:
290292>
291293 :echo synIDattr(synID(line('.'), col('.'), 1), "name")
292294<
293- You just need to specify a part of a result in the scope since it use
294- regex pattern to match it ( For example: if the result is 'luaComment'
295+ You just need to specify a part of a result in the scope since it uses
296+ a regex pattern to match it ( For example: if the result is 'luaComment'
295297 you only need to specified 'comment' , case doesn't matter).
296298
297- g:completion_auto_change_source *g:completion_auto_change_source*
299+ g:completion_auto_change_source *g:completion_auto_change_source*
298300
299301 You can let completion-nvim changes source whenever current source has
300302 no complete items by setting this option to 1.
0 commit comments