-
Notifications
You must be signed in to change notification settings - Fork 274
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
Select parent skeleton first before other properties are suggested #691
Select parent skeleton first before other properties are suggested #691
Conversation
LGTM in general one minor comment on the code. However I would like to change the name of the setting. As we seem to be getting more settings related to completions. Can we start to group such settings under |
@@ -589,7 +591,8 @@ export class YamlCompletion { | |||
const lineContent = textBuffer.getLineContent(overwriteRange.start.line); | |||
const hasOnlyWhitespace = lineContent.trim().length === 0; | |||
const hasColon = lineContent.indexOf(':') !== -1; | |||
|
|||
const isNodeNull = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we initalize isNodeNull this early? Are there other places it is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved it down neer to usage
Also this one needs a rebase |
I moved |
What does this PR do?
This functionality helps a less technical person not to get lost on completion when there are complicated schemas and many properties that can be used (see the last screen - there are too many options so the user should select the parent/skeleton first and don't have to care about all possible properties).
It little bit extends 'parent/skeleton' object completion.
This PR adds
yaml.selectParentSkeletonFirst
. If true, the user must select some parent skeleton first before autocompletion starts to suggest the rest of the properties.When yaml object is not empty, autocompletion ignores this setting and returns all properties and skeletons.
Not sure if it's useful for your users but it can help others (less technical creators).
examples
suggest only skeletons because object is empty:
whit disabled property
yaml.selectParentSkeletonFirst
(default)properties are suggested as usual when the user tries to write it:
when the object is not empty, standard completion is displayed
Note that I haven't created PR for yaml client yet. I can create it when you check this one.