Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when formatting unsafed files #1207

Open
vicary opened this issue Nov 14, 2024 · 0 comments
Open

Errors when formatting unsafed files #1207

vicary opened this issue Nov 14, 2024 · 0 comments
Assignees

Comments

@vicary
Copy link

vicary commented Nov 14, 2024

Describe the bug
When trying to format a new file in VS Code that is not yet saved to disk, deno formatter fails with the following error

Could not convert URL to file path.
  URL: file://untitled-2/.ts?scheme=untitled
[Error - 17:05:16] Request textDocument/formatting failed.
  Message: Invalid request
  Code: -32600 

To Reproduce

  1. Create a new file in VS Code, do not save the file
  2. Choose a Language Mode supported by Deno
  3. Format document with Deno

Expected behavior

Deno plugin correctly formats the unsafed file in place, similar to what VS Code's built-in language features do.

Screenshots

image

Versions

vscode: 1.95.2 deno: 2.0.6 extension: 3.42.0

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

No branches or pull requests

2 participants