nvim-completion-manager
nvim-completion-manager copied to clipboard
Ability to prioritize function parameters and showing them on entering (
Is it possible to:
- Have an option to prioritize function parameters.
- Show function parameters when user enters
(. For example when enteringserializers.SerializerMethodField((python, rest framework) would be great to show method_field as first completion suggestion and when enteringserializers.SerializerMethodField(mewould be great to havemethod_fieldas first suggestion (currently for me it'smapthenmax, etc,method_fieldis 6th)
- Have an option to prioritize function parameters.
I guess you want custom sorting of the python completion items.
A completion source can use its own sort algorithm with the sort option set to 0 (it's currently undocumented behavior).
- Show function parameters when user enters
(. For example when enteringserializers.SerializerMethodField((python, rest framework) would be great to show method_field as first completion suggestion and when enteringserializers.SerializerMethodField(mewould be great to havemethod_fieldas first suggestion (currently for me it'smapthenmax, etc,method_fieldis 6th)
ncm's python completion is based on jedi library. According to the documentation, it doesn't have this feature.
However, it seems possible to implement it, as the completion results returned by jedi has information about the type. To be specific, it's Completion.BaseDefinition.type
http://jedi.readthedocs.io/en/latest/_modules/jedi/api/classes.html#Completion.
It is not really attractive to me so I have no plan to support it.
OK, maybe I can make a PR if it attracts myself 😄