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

feat: parent completion #628

Merged
merged 7 commits into from
Jan 12, 2022

Conversation

p-spacek
Copy link
Contributor

@p-spacek p-spacek commented Jan 1, 2022

What does this PR do?

Add the possibility to suggest and insert the whole object structure. So a user doesn't have to add required properties one by one.
Another advantage is when a user has to pick between a few 'anyOf' objects.
It also works with incomplete objects.

Display two possibilities (anyOf) of complex objects and insert the whole structure of all required props of the object.

Screen.Recording.2022-01-01.at.23.30.05.mov

Suggest the rest of the 'parent' object (missing required props).

Screen.Recording.2022-01-01.at.23.30.24.mov

Added also feature that adds const value instead of $1. So instead of prop: {$1:value} is used prop: value. (beginning of the second video)

What issues does this PR fix or reference?

no ref

Is it tested? How?

few unit tests

@coveralls
Copy link

coveralls commented Jan 1, 2022

Coverage Status

Coverage increased (+0.3%) to 79.821% when pulling 9d817e5 on p-spacek:feat/parent-completion into 4a36b9b on redhat-developer:main.

Copy link
Collaborator

@evidolob evidolob left a comment

Choose a reason for hiding this comment

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

Could you resolve merge conflict?

src/languageservice/services/yamlCompletion.ts Outdated Show resolved Hide resolved
@p-spacek p-spacek changed the title Feat/parent completion feat: parent completion Jan 12, 2022
@evidolob evidolob merged commit 436443c into redhat-developer:main Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants