Open mrcjkb opened 3 years ago
@MrcJkb
Do you mean the minimum amount of characters after which completion should be triggered?
if so, have tried let g:completion_trigger_keyword_length = 3
@MrcJkb Do you mean the minimum amount of characters after which completion should be triggered? if so, have tried let
g:completion_trigger_keyword_length = 3
Yes, thanks for the hint. But I suppose that variable would affect all sources, wouldn't it? Ideally, I would like to be able to set the minimum amount of characters for different sources, e.g. 2 for UltiSnips and 5 for LSP.
Hmm, I doubt there is a way to do that yet.
Maybe play around with let g:completion_sorting = "length"
. I dont know if length sorts ascending or descending, but worth a try?
Is your feature request related to a problem? Please describe. It is usually faster to type a 2-3 letter keyword than it is to select it from an auto-complete list. For example, with my current configuration, typing
in
results in the following completion list:Describe the solution you'd like For me, the
if
andint
completions (and possibly the UltiSnipsin
snippet) are useless, as it is faster to just type them. It would be great to be able to configure a minimum length for completion items. Either globally or by source (e.g. so that a different minimum completion length could be set for snippet completions than for LSP completions).Describe alternatives you've considered I may look into this myself when I have some time. Here is a good article that describes the problem: https://blog.jetbrains.com/blog/2021/05/28/code-completion-episode-1-scenarios-and-requirements/