You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is both a bug and a feature request (which I'm willing to implement if needed in #790), but when setting up the workspace, deno.fmt is enabled, but even with all the extensions disabled and just deno enabled, it doesn't seem to correctly set the default formatter to denoland.vscode_deno by default.
To Reproduce
To get a better reproducibility disable all your extensions by cmd+shif+p -> Disable all installed extensions:
Then enable only the deno extension on the extension manager.
Set up a new directory anyywhere
Initialize deno workspace, answer yes to all questions
There should be a .vscode/settings.json file with these contents:
{
"deno.enable": true,
"deno.unstable": true,
}
Create a *.ts file anywhere, type any full TS command with a different formatting then Deno expects, like:
import{resolve}from'https://deno.land/std/path/mod.ts'// /\ single quotes /\ missing ;
Save the file, if you haven't configured editor.formatOnSave option, this shouldn't do anything by default, however if you do cmd+shift+p -> format document, is also doesn't do anything.
Expected behavior
It should apply deno.fmt on the file and the line should look like:
Also would be a nice addition to ask if the user wants to format on save and then include editor.formatOnSave as true as I see there's #328 about it too.
The text was updated successfully, but these errors were encountered:
khaosdoctor
added a commit
to khaosdoctor/vscode_deno
that referenced
this issue
Jan 15, 2023
Describe the bug
This is both a bug and a feature request (which I'm willing to implement if needed in #790), but when setting up the workspace,
deno.fmt
is enabled, but even with all the extensions disabled and just deno enabled, it doesn't seem to correctly set the default formatter todenoland.vscode_deno
by default.To Reproduce
To get a better reproducibility disable all your extensions by
cmd+shif+p
->Disable all installed extensions
:Then enable only the
deno
extension on the extension manager..vscode/settings.json
file with these contents:*.ts
file anywhere, type any full TS command with a different formatting then Deno expects, like:editor.formatOnSave
option, this shouldn't do anything by default, however if you docmd+shift+p
->format document
, is also doesn't do anything.Expected behavior
It should apply
deno.fmt
on the file and the line should look like:Screenshots
This is a gif of the current behaviour:
I figured out that, if you set
"[typescript]": { "editor.defaultFormatter": "denoland.vscode_deno" }
in the settings, this would work, like so:Versions
vscode: 1.74.3 deno: 1.29.2 extension: v3.16.0
Proposed solution
Include, by default, these lines in the settings when setting up the workspace:
Also would be a nice addition to ask if the user wants to format on save and then include
editor.formatOnSave
astrue
as I see there's #328 about it too.The text was updated successfully, but these errors were encountered: