vscode-intelephense
vscode-intelephense copied to clipboard
Placeholders for function completions
Feature description or problem with existing feature
Currently the language server only returns a single parameter for function completions.
For example
function test($param, $param2) {}
The completion for test is test().
Describe the solution you'd like
The current language server completion response is test($0).
Btw. $0 is the placeholder for the final cursor position according to the docs.
It would be nice if all the parameters are returned: test(${1:\$param}, ${2:\$param2})$0.
Btw. $0 is the placeholder for the final cursor position according to the docs.
This is as designed, otherwise you would get test()|
It would be nice if all the parameters are returned
I think this is down to individual preference. I'll explore adding an option for this.
Maybe for an intermediate state it would make sense to change it to test($1)$0. Then the workflow would be a) complete b) type params c) jump after completion and go on with the following code.
Maybe for an intermediate state it would make sense to change it to
test($1)$0
I don't see the benefit. The only difference is that you would press tab instead of ) or right arrow to get outside of the argument list.
) and "right arrow" are hard to reach on my (DE) keyboard layout.
For ) I have to press shift(9) and the arrow keys are far away. Just "tabbing" provides in my opinion a better flow.