vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Applying a Compose completion item makes my YAML file malformed

Open rcjsuen opened this issue 5 months ago • 4 comments

Describe the bug

Code completion "in between" another attribute seems to "reuse" the content after it and produces a malformed YAML file.

Expected Behavior

Applying a completion item produce a reasonable YAML file perhaps missing an attribute's value for me to type.

Current Behavior

Applying this completion item has made my YAML file look even worse than it started.

Steps to Reproduce

  1. Create compose.yaml with the content below.
  2. Invoke code completion on the - bi line.
  3. Accept the bind and the applied content appears to be corrupt.
  4. I only have the Red Hat extension enabled and the Docker ones have been disabled.
services:
  test:
    volumes:
      - bi
        type: tmpfs

https://github.com/user-attachments/assets/bb68f459-47ea-430f-aab5-7b36e3958df8

Image

Environment

  • [ ] Windows
  • [x] Mac
  • [ ] Linux
  • [ ] other (please specify)

rcjsuen avatar Apr 28 '25 19:04 rcjsuen