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

Fix the named argument code completion for constructors #6911

Merged

Conversation

junichi11
Copy link
Member

  • Show argument names in consturctors

nb-php-named-argument-cc-improvement-constructor

  • Don't add : if an existing name has : (an improvement)

e.g. ^maxLength: (^: caret)
We are unsure whether a user expects to add or override an item in this context. So, just add a name. (i.e. don't add ":")
This behavior is useful when the consuming completion(Ctrl + Enter) is used.

Before:

nb-php-named-argument-cc-improvement-before

After:

nb-php-named-argument-cc-improvement-after

  • Add unit tests

@junichi11 junichi11 added the PHP [ci] enable extra PHP tests (php/php.editor) label Jan 3, 2024
@junichi11 junichi11 added this to the NB21 milestone Jan 3, 2024
@junichi11 junichi11 requested a review from tmysik January 3, 2024 09:25
Copy link
Member

@tmysik tmysik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice improvement, thanks!

@junichi11
Copy link
Member Author

@tmysik Thank you for your review! I'll fix it.

- Show argument names in consturctors
- Don't add `:` if an existing name has `:` (an improvement)

e.g. ^maxLength: (^: caret)
We are unsure whether a user expects to add or override an item in this context.
So, just add a name. (i.e. don't add ":")
This behavior is useful when the consuming completion(<kbd>Ctrl</kbd> + <kbd>Enter</kbd>) is used.

- Add unit tests
@junichi11 junichi11 force-pushed the php-named-argument-cc-for-constructor branch from 1056bc2 to 24ba6df Compare January 4, 2024 11:20
@junichi11 junichi11 merged commit d81235c into apache:master Jan 4, 2024
34 checks passed
@junichi11 junichi11 deleted the php-named-argument-cc-for-constructor branch January 4, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants