Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter type hints while typing #507

Open
tgr opened this issue Jun 22, 2018 · 1 comment
Open

Parameter type hints while typing #507

tgr opened this issue Jun 22, 2018 · 1 comment

Comments

@tgr
Copy link
Contributor

tgr commented Jun 22, 2018

It would be awesome to get parameter type hints (maybe even parameter documentation) when typing function arguments. The doc command can be used for this but it's a bit inconvenient. Tab completion could be hijacked for this nicely:

$foo->bar(<tab><tab>

could show the type and name of the parameter.

$foo->bar(x<tab><tab>

would work in the normal way, finding global methods / variables / whatever starting with x. This way, it would be impossible to use double-tab to get a list of all global functions, but that functionality is fairly useless anyway.

@calvinmkissinger
Copy link

Would love type hints... especially for the standard library.

type in

preg_match(<tab> 

and see

preg_match($pattern, $subject, &$subpatterns = unknown, $flags = unknown, $offset = unknown)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants