-
Notifications
You must be signed in to change notification settings - Fork 645
Adopt formatOnSave changes #540
Comments
Can that |
@jrieken In VS Code 1.6 only formatters implementing Can you confirm? |
Yeah - I have fixed a bug for the Oct release that makes sure we honour Document and DocumentRange formatters. |
great, will wait for the next release then |
I think you should keep |
agreed on it needing to be a language specific thing. that is not expected by folks in other languages in general. If I formatted javascript on save, i'd have a lot of really annoyed co-workers. As it stands, I basically can't use vscode as my go editor as I'm so used to format-on-save that I don't even think of formatting. And, being a child of the DOS era, I habitually save as I move around looking at files. So having javascript code that I have no intention of changing get reformatted as a side effect of 25 year old muscle memory is kind of a non-starter. |
Current State: The adoption of |
why? |
@jrieken |
Now that Things to do
|
|
@ishanray how much time does it take otherwise? |
@ramya-rao-a Otherwise it takes very less. Almost unnoticeable. I can look into it further if required. |
That's ok. We cannot rely on the |
The latest update to the Go extension (0.6.70) has adopted the |
Since VS Code now has the
editor.formatOnSave
-setting and theonWillSaveTextDocument
-event, this code should be revisited. I'd recommend to remove it and to rely on the built-informatOnSave
feature or to use the new event. Both will prevent unnecessary fs-operations and reduce the risk for endless write-event-write loops.See https://code.visualstudio.com/updates#_format-on-save, microsoft/vscode#12449, and microsoft/vscode#239 for more details
The text was updated successfully, but these errors were encountered: