yasuyuky/autocomplete-clang

Don't write function prototypes when call functions, show hint instead

KSXGitHub opened this issue · 2 comments

This is a feedback/enhancement request rather than a bug report.

Reproduction Step

  1. Declare a C++ function with more than 1 parameter (e.g. NameSpace::Value myfunc (NameSpace::Value & param1, NameSpace::Value * param2)).
  2. Inside another function (e.g. int main ()), use autocomplete to find myfunc prototype (which created by this package, not by the default autocomplete package) and hit Enter.

Result

Both function name and parameters (including types and names, which are useless in this situation) are written, user has to replace (or delete) every characters between ( and ) by proper values, which is painful.

Expectation

  • In region for declaration (which contains no statements, no expression, no function call..., e.g. class, global scope...): Retain old behaviour.
  • In region for statements (which contains executable code of a function): Still show full function prototypes in the list (if possible), but write only function names when hit Enter, user'll deals with the rest.

Extra expectation (if possible)

  • When user types a function-call and the text caret is standing between two parenthesis myfunc(...|...), show function's prototype as a hint, highlight which parameter that the caret is on (Similar to Visual Studio)

An autocomplete package is supposed to be helping users type code faster, right?

Wondered if I had the plugin misconfigured. It would be great to see this improved!

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.