Closed ghost closed 2 years ago
Could a test also be added for this? https://github.com/microsoft/azure-pipelines-language-server/blob/main/language-service/test/pipelinesTests/yamlcompletion.test.ts
Could a test also be added for this? https://github.com/microsoft/azure-pipelines-language-server/blob/main/language-service/test/pipelinesTests/yamlcompletion.test.ts
I have added a test.
Hi @50Wliu, could you please merge this PR?
We have quite old bug about auto-completion that breaks structure: https://github.com/microsoft/azure-pipelines-vscode/issues/176 It happens in cases when we use auto-completion for properties, because function
getInsertTextForProperty
always adds colon for result text for auto-completion.Description of the fix: Check if node, that should be completed, already contains colon, and increase length of section that should be replaced I've tested these changes on VSCode azure-pipelines extension: ran it locally and tried to work on some yaml doc, using different types of node and requested auto-completion from different places - everything looks fine
The previous behavior:
The new behavior: