You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when using vscode with the extension, the following happens:
However, if you add quotes around the object key in the YAML, the autocomplete dropdown works as expected as you can see in the following image:
I have also found the same issue arises when using other special characters at the start of the object key property name. This issue seems to be similar to the issue fixed here: redhat-developer/yaml-language-server#435
Maybe if an object key starts with any non-alphanumeric/special characters, it should be quoted be default? And also if the object key contains a : it should also be quoted.
Steps to Reproduce
Create a JSON schema using the schema from above
When using this schema with the vscode-yaml extension, use ctrl+space to have the dropdown auto complete option appear and select the item in the dropdown (in this example it is Test: Colon
See that when doing ctrl+space again under that object, it wont have the expected behavior where it has none as the selectable item in the dropdown.
Environment
Windows
[x ] Mac
Linux
other (please specify)
The text was updated successfully, but these errors were encountered:
SucculentGoose
changed the title
Autocomplete not working when certain characters are in property keys
Autocomplete not working when certain characters are in object property keys
Apr 27, 2021
Describe the bug
If there is a colon in a property key name, it breaks the auto complete dropdown from working. For example, if i have the following schema:
when using vscode with the extension, the following happens:
However, if you add quotes around the object key in the YAML, the autocomplete dropdown works as expected as you can see in the following image:
I have also found the same issue arises when using other special characters at the start of the object key property name. This issue seems to be similar to the issue fixed here: redhat-developer/yaml-language-server#435
Maybe if an object key starts with any non-alphanumeric/special characters, it should be quoted be default? And also if the object key contains a
:
it should also be quoted.Steps to Reproduce
Test: Colon
none
as the selectable item in the dropdown.Environment
The text was updated successfully, but these errors were encountered: