Skip to content

Still generating diagnostics for .vdoc files when a formatter is set up #855

@juliasilge

Description

@juliasilge

Related to #832 where we did work to turn off diagnostics in the virtual documents

If you have a Quarto file with a syntax error such as this:

---
title: "Untitled"
format: html
---

Hi!

```{python}
x = {"x1": 1, "x2": 2 "x3": 3, "x4": 4}
```

Bye!

And you have a formatter installed and turned on for the underlying language, like this in settings.json:

    "[python]": {
        "editor.defaultFormatter": "charliermarsh.ruff"
    },

Then you can still get a PROBLEM reported for the underlying virtual document:

Image

This problem also occurs in Positron, and applies to both R and Python if you have a formatter for either installed.

It's a little tricky to get the diagnostics to show up, but I typically can get it to happen if I edit a character or two in the code cell. We have a report in posit-dev/positron#4482 (reply in thread) of this happening when you format the document but I did not find that to always cause this to happen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvscode

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions