Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit 25dac52

Browse files
authored
Merge pull request #319 from adrian5/docfix
Fix some textual details
2 parents a31127e + 64e37e4 commit 25dac52

File tree

3 files changed

+33
-41
lines changed

3 files changed

+33
-41
lines changed

doc/completion-nvim.txt

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
*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.
44

55

66
CONTENTS *completion-nvim*
@@ -12,14 +12,14 @@ CONTENTS *completion-nvim*
1212
3. Options .............. |completion-option|
1313

1414
==============================================================================
15-
INTRODUCTION *completion-introdction*
15+
INTRODUCTION *completion-introduction*
1616

1717
completion-nvim is an auto completion framework that aims to provide a better
1818
completion experience with neovim's built-in LSP. Other LSP functionality is
1919
not supported.
2020

2121
==============================================================================
22-
FEATURE *completion-features*
22+
FEATURES *completion-features*
2323

2424
- Asynchronous completion using libuv api.
2525
- Automatically open hover windows when popupmenu is available.
@@ -74,7 +74,6 @@ g:completion_enable_auto_popup *g:completion_enable_auto_popup*
7474
imap <tab> <Plug>(completion_smart_tab)
7575
imap <s-tab> <Plug>(completion_smart_s_tab)
7676
<
77-
7877
default value: 1
7978

8079
g:completion_enable_snippet *g:completion_enable_snippet*
@@ -97,12 +96,11 @@ g:completion_confirm_key *g:completion_confirm_key*
9796
" Change confirm key to <C-y>
9897
let g:completion_confirm_key = "\<C-y>"
9998
<
100-
10199
default value: "\<CR>"
102100

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:
106104
>
107105
let g:completion_confirm_key = ""
108106
imap <expr> <cr> pumvisible() ? complete_info()["selected"] != "-1" ?
@@ -120,8 +118,8 @@ g:completion_enable_auto_hover *g:completion_enable_auto_hover*
120118

121119
g:completion_enable_auto_signature *g:completion_enable_auto_signature*
122120

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.
125123

126124
default value: 1
127125

@@ -133,38 +131,39 @@ g:completion_enable_auto_paren *g:completion_enable_auto_paren*
133131
default value: 0
134132

135133
g:completion_trigger_character *g:completion_trigger_character*
134+
136135
You can add or disable a trigger character that will trigger
137136
completion.
138137

139-
For example, disable trigger character
138+
For example, disable trigger character:
140139
>
141140
let g:completion_trigger_character = []
142141
<
143-
Or having multiple trigger characters
142+
Or having multiple trigger characters:
144143
>
145144
let g:completion_trigger_character = ['.', '::']
146145
<
147146
Use an autocmd if you want a different trigger character for different
148-
lanugages.
147+
languages:
149148
>
150149
augroup CompletionTriggerCharacter
151150
autocmd!
152151
autocmd BufEnter * let g:completion_trigger_character = ['.']
153152
autocmd BufEnter *.c,*.cpp let g:completion_trigger_character = ['.', '::']
154153
augroup end
155154
<
156-
157155
default value: ['.']
158156

159157
g:completion_enable_server_trigger *g:completion_enable_server_trigger*
160158

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+
163162
You can turn it off by setting this option to zero.
164163

165164
default value: 1
166165

167-
g:completion_trigger_keyword_length *g:completion_trigger_keyword_length*
166+
g:completion_trigger_keyword_length *g:completion_trigger_keyword_length*
168167

169168
You can specify keyword length for triggering completion, if the
170169
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*
175174

176175
default value: 1
177176

177+
g:completion_trigger_on_delete *g:completion_trigger_on_delete*
178178

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:
184181
>
185182
let g:completion_trigger_on_delete = 1
186183
<
187-
188-
189184
g:completion_timer_cycle *g:completion_timer_cycle*
190185

191186
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*
201196
vim-mucomplete. In short, you can divide completion sources in groups
202197
and have an ins-completion method as backup completion.
203198

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
206201
ins-complete sources. Specify 'mode' as your key for ins-complete
207202
sources, 'complete_items' for other sources. For example:
208203
>
@@ -244,7 +239,6 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
244239
"Neosnippet": neosnippet source
245240
"vim-vsnip": vim-vsnip source
246241
<
247-
248242
For ins-complete sources, possible 'mode' to the actual key in vim are
249243
listed below.
250244
>
@@ -266,7 +260,6 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
266260
<
267261
You can also specify different completion lists for different
268262
filetypes, for example:
269-
270263
>
271264
let g:completion_chain_complete_list = {
272265
\ 'vim': [
@@ -312,7 +305,7 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
312305
<
313306
For every completion source, you can specify `triggered_only` key.
314307
This completion source will only trigger when this key is press. For
315-
example
308+
example:
316309
>
317310
let g:completion_chain_complete_list = {
318311
\ 'default' : {
@@ -325,15 +318,14 @@ g:completion_chain_complete_list *g:completion_chain_complete_list*
325318
\ }
326319
\}
327320
<
328-
329321
Note: Every syntax highlighter has a different syntax name
330322
defined(most of them are similar though). You can check your syntax
331323
name under your cursor by this command:
332324
>
333325
:echo synIDattr(synID(line('.'), col('.'), 1), "name")
334326
<
335327
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'
337329
you only need to specified 'comment', case doesn't matter).
338330

339331
g:completion_auto_change_source *g:completion_auto_change_source*
@@ -346,17 +338,17 @@ g:completion_auto_change_source *g:completion_auto_change_source*
346338
g:completion_matching_strategy_list *g:completion_matching_strategy_list*
347339

348340
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:
352344
>
353345
let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy', 'all']
354346
<
355347
default value: ['exact']
356348

357349
g:completion_matching_ignore_case *g:completion_matching_ignore_case*
358350

359-
Enable ignore case matching in all matching strategy. For example
351+
Enable ignore case matching in all matching strategy. For example:
360352
>
361353
let g:completion_matching_ignore_case = 1
362354
<

lua/completion/chain_completion.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ function M.checkHealth(complete_items_map)
105105
else
106106
local ins = require 'completion.source.ins_complete'
107107
if ins.checkHealth(complete_source.mode) then
108-
health_error(complete_source.mode.." is not a valid insert complete mode")
108+
health_error(complete_source.mode.." is not a valid insert completion mode")
109109
end
110110
end
111111
end
112112
end
113113
end
114114
if not error then
115-
health_ok("all completion source are valid")
115+
health_ok("all completion sources are valid")
116116
end
117117
end
118118

lua/completion/health.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ end
1717
local checkSnippetSource = function()
1818
local snippet_source = opt.get_option('enable_snippet')
1919
if snippet_source == nil then
20-
health_info("You haven't setup any snippet source.")
20+
health_info("You haven't set up any snippet source")
2121
else
2222
local rtp = string.lower(api.nvim_get_option("rtp"))
2323
local unknown_snippet_source = true
@@ -34,7 +34,7 @@ local checkSnippetSource = function()
3434
if string.match(rtp, ".*"..v..".*") then
3535
health_ok("You are using "..k.." as your snippet source")
3636
else
37-
health_error(k.." is not available! Check if you install "..k.." correctly.")
37+
health_error(k.." is not available! Check if you installed "..k.." correctly")
3838
end
3939
break
4040
end
@@ -49,7 +49,7 @@ end
4949
function M.checkHealth()
5050
health_start("general")
5151
if vim.tbl_filter == nil then
52-
health_error("vim.tbl_filter is not found!", {'consider recompile neovim from the latest master branch'})
52+
health_error("vim.tbl_filter is not found!", {'consider recompiling neovim from the latest master branch'})
5353
else
5454
health_ok("neovim version is supported")
5555
end

0 commit comments

Comments
 (0)