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 completion indentation for object in array #332

Merged
merged 2 commits into from
Oct 21, 2020

Conversation

evidolob
Copy link
Collaborator

@evidolob evidolob commented Oct 6, 2020

This is firs PR, fix completion snippet generation for object in array. We also have problem with settings synchronisation, in case if editor.tabSize set up in language scope [yaml] we not take in account it. This PR fix that, but it also requires fix in vscode-yaml which I'm going to provide.

For #329

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@evidolob evidolob self-assigned this Oct 6, 2020
@coveralls
Copy link

coveralls commented Oct 6, 2020

Coverage Status

Coverage increased (+0.02%) to 77.947% when pulling 242b3fc on evidolob:fix-329 into 7575e78 on redhat-developer:master.

Copy link
Contributor

@JPinkney JPinkney left a comment

Choose a reason for hiding this comment

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

Tested it out and it works well

src/server.ts Show resolved Hide resolved
@@ -260,7 +260,7 @@ export class YAMLCompletion extends JSONCompletion {
addValue: boolean,
separatorAfter: string,
collector: CompletionsCollector,
document
document: TextDocument
Copy link
Member

Choose a reason for hiding this comment

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

Did you know that TextDocument is deprecated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, but we use it across all project.

`${indent}${this.indentation}`,
insertIndex++
);
const objectInsertResult = this.getInsertTextForObject(schema, separatorAfter, `${this.indentation} `, insertIndex++);
Copy link
Member

Choose a reason for hiding this comment

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

Do you need to also make this change for line 736 above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@evidolob evidolob merged commit 0b2f7c5 into redhat-developer:master Oct 21, 2020
@evidolob evidolob deleted the fix-329 branch October 21, 2020 07:26
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.

None yet

4 participants