Skip to content

Conversation

@juliasilge
Copy link
Collaborator

@juliasilge juliasilge commented Sep 30, 2025

Addresses #819, which has been quite a bear in real work! Many, many diagnostics from our vdoc files, every time you save a file with a syntax error in it. 😱

It turns out the Middleware from "vscode-languageclient" already has a way to do HandleDiagnosticsSignature, so this was fairly straightforward.

I will get started on using Claude to write an extension test for this.

@juliasilge juliasilge marked this pull request as ready for review September 30, 2025 00:54
Comment on lines 1048 to 1054
"quarto.vdoc.hideDiagnostics": {
"order": 26,
"scope": "window",
"type": "boolean",
"default": true,
"markdownDescription": "Hide diagnostics (problems) reported for internal virtual document files. These are temporary files used to provide language features in code blocks."
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I see any reason to have this option

In the long term I'd actually like if Quarto didn't generate virtual docs at all, which would render this option kind of useless anyways!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great point! If we're trying to deal with problems in this area, then we're just using a dev build anyway.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for reviving a closed PR conversation, but @DavisVaughan do you have something in mind for replacing virtual docs?

Comment on lines 57 to 66
export function isVirtualDoc(uri: Uri): boolean {
// Check for tempfile virtual docs
if (uri.scheme === "file") {
const filename = path.basename(uri.fsPath);
// Virtual docs have a specific filename pattern .vdoc.[uuid].[extension]
return filename.startsWith(".vdoc.") && filename.split(".").length > 3;
}

return false;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind placing this alongside generateVirtualDocFilepath()? That is where we actually generate the file path, so that would help us keep these in sync

@juliasilge juliasilge merged commit 6ac1612 into main Oct 1, 2025
2 checks passed
@juliasilge juliasilge deleted the create-diagnostic-filter-for-vdocs branch October 1, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants