How can I `deno fmt` on file save?
See original GitHub issueAlso asked on stack overflow
I was wondering if there was a builtin way of formatting on save, right now I hacked my way into this thanks to the RunOnSave extension but it feels hacky and I don’t know if it’s a bug from the vscode-deno extension or if I’m not configuring things right
My current .vscode/settings.json
{
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true,
"emeraldwalk.runonsave": {
"commands": [
{
"match": "\\.ts$",
"cmd": "deno fmt ${file}"
}
]
}
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7
Top Results From Across the Web
How to format on save with the Deno VSCode extension?
Found it, I have to turn on formatting on save and specifying the Deno extension as the default formatter { "deno.enable": true, "editor....
Read more >Code Formatter - deno fmt
Deno ships with a built-in code formatter that will auto-format the following files:
Read more >Formatting code with deno fmt - Medium
Deno's built-in formatter is available through fmt subcommand. There are two type of inputs it can take: List of files to consider: If ......
Read more >Quick Tip: Deno Fmt in WebStorm - Level Up Coding
3. Populate the required options. Give the watcher a name (I've gone with Deno Fmt). For Program use deno and for Arguments use ......
Read more >deno: format on save option : WEB-53244 - JetBrains YouTrack
currently have to use a file watcher to run deno fmt , which is slow and janky. Activity settings. Andres Rodriguez commented 20...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah yes didn’t know about this one! Indeed this appears to be the minimal vscode config to
deno fmt
on saveAdding this to the project in
.vscode/settings.json
worked for me: