redhat-developer / yaml-language-server

Language Server for YAML Files
MIT License
1.1k stars 264 forks source link

feat: unify string insert text for array and property #934

Closed p-spacek closed 6 months ago

p-spacek commented 1 year ago

What does this PR do?

unify string text inserting for array and property

when you choose string property from completion you get na -> name:

but for array, it generated extra quotes: arr ->

array:
  - ""

These extra quotes caused, that it wasn't possible to invoke completion just after the code insert, but you had to delete "" continue...

the behavior is just a little bit different than for property text inserting.

https://github.com/redhat-developer/yaml-language-server/assets/38421337/8d73fb4a-8b10-49d9-ac27-ac37362d89c4

Note that I didn't change it for number nor for bool because it seems to me a little bit different scenario

What issues does this PR fix or reference?

Is it tested? How?

update current tests

coveralls commented 1 year ago

Coverage Status

coverage: 84.076%. remained the same when pulling 8d26886b379e08843ce1bb96e1c6de8a232383b9 on jigx-com:feat/unify-string-insert-text-for-array-and-property into dfccc6fc095faeb5d07051b51f308478cdac70fd on redhat-developer:main.