You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From experimentation, keyword_length seems to be the min number of characters that a word must have to appear in the auto-completion list, not the number of characters that need to be typed to trigger auto-completion (which is what the README says). My understanding seems to be consistent with
I have to concur with @davidq2010 in that this behavior is very confusing and seems unintentional. The keyword_length option in the top level of a source's table determines the number of characters that will trigger the completion menu while keyword_length within option determines the minimum length of a completion candidate. It would be best to change the latter to something more descriptive like min_candidate_length and update the documentation.
localbuffer_source= {
name='buffer',
keyword_length=5, -- Trigger completion menu on Nth character.option= {
keyword_length=5, -- Minimum length for completion candidates.
}
}
same here - I completely agree with @scienceplease that a different keyword would help here.
Perhaps - unless I missed it - it could make sense to mention in the docs that top-level nvim-cmp source options are allowed /required and where to find them
From experimentation, keyword_length seems to be the min number of characters that a word must have to appear in the auto-completion list, not the number of characters that need to be typed to trigger auto-completion (which is what the README says). My understanding seems to be consistent with
cmp-buffer/lua/cmp_buffer/buffer.lua
Line 324 in f83773e
It would be really nice however if keyword_length actually was the number of chars to be typed to trigger auto-completion.
The text was updated successfully, but these errors were encountered: