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

wrong line underlined as syntax errors

Open aep-sunlife opened this issue 1 year ago • 1 comments

Describe the bug

When a YAML field is accidentally indented one space, where it should have been flush with the zeroth column, then VSCode sometimes produces error underlines the wrong line. Instead of highlighting that line, it highlights (commented) code above.

Expected Behavior

Fields indented too deep receive error underlines.

Current Behavior

(Commented) lines way up above get all the syntax checker attention, distracting users from the true root cause.

Steps to Reproduce

Image

Environment

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

By the way, some other editors like IntelliJ experience similar issues.

aep-sunlife avatar Feb 10 '25 16:02 aep-sunlife

can confirm

abc: string
# comment

 foo: bar

Image

I would think this is a upstream issue https://github.com/eemeli/yaml

RedCMD avatar Feb 13 '25 08:02 RedCMD