Closed Stokestack closed 17 hours ago
Are you sure Deno is configured as your formatter? I don't think "format selection" is implemented. Do you have format on save enabled? What's causing the format to occur? It kind of looks like vscode from the video. Can you provide the actions you're taking to reproduce this? (ex. what keys are you pressing)
Thanks for the follow-up. It's not happening on saving, so I don't think that's related. "Format selection" is doing stuff, so I don't know what you mean by not implemented.
I'm using normal cut & paste keys. On Mac, that's Command-X, Command-V.
I noted that I'm using the Deno plug-in for VS Code, so it's possible that the bug is there. But I have no way of determining that (as far as I know).
I think that's just vscode then. It probably happens with the deno extension being disabled.
It's not disabled. What do you mean?
I mean my guess is if you disable the deno vscode extension then you'll probably still see the behaviour you describe.
I don't believe the Deno extension formats except on save and only if it's configured to.
Thanks! And, in fact that's true. I wonder what is messing it up. I don't find any relevant option in the VS Code settings.
Anyway, closing this.
deno 2.0.6 (stable, release, aarch64-apple-darwin) v8 12.9.202.13-rusty typescript 5.6.2
I'm using the Deno plug-in for VS Code. When cutting and pasting code, something is messing up the indentation of function bodies, adding an extra level. Also, when pressing Return after a function signature, the first line is similarly indented an extra level... despite the "format selection" command previously having put the rest of the body at the correct position. Screen grab attached.
Here's what I have for formatting in deno.json:
https://github.com/user-attachments/assets/14999ab5-bb15-4af2-aa56-02aa06a3a293