Do you use client-side editing in VS Code? We want your feedback on the latest improvements!
Since our previous announcement, we have introduced several incremental improvements to the client‑side editing experience in VS Code. These updates focus on preserving developer‑authored formatting when synchronizing with the server.
What Changed
Client‑side *.cls files previously lost certain formatting details during compilation, including keyword casing (e.g., classmethod → ClassMethod), normalization of blank lines between class members, and removal of line breaks within parameter lists. The extension now separates formatting from the synchronization process so that user-defined formatting is retained.
In the typical client‑side workflow, only the Storage sections of classes are updated by the server. The recent changes ensure that synchronization updates only these sections, preventing unnecessary modifications to the rest of the file.
A new configuration option has been added: refreshClassesOnSync : boolean = false. By default, only the storage sections are refreshed after synchronization, preserving all other content, including formatting. Setting this value to true restores the previous behavior of refreshing the full class file.
Try and Provide Feedback
vscode-objectscript-3.6.1-storage.1.vsix.zip
- Download the zipped VSIX file and unzip it.
- Install the VSIX in VS Code using the standard extension installation instructions or by dragging the file into the Extensions view.
- Follow your normal development workflow and evaluate the updated behavior. Please share your experience either here or in the associated GitHub pull request.
Comments
Great work, KC!
Hi @KC Lu - I have been using a local repo that connects to a server remotely, and it works great! Things update simultaneously. The only specific part that always asks me for mismatches is the Storage section on %Persistent classes, as you're mentioning. I will try to use the refreshClassesOnSync config and see if that fixes it. Additionally, where can I find all the configuration options for my .vscode/settings.json related to "objectscript.conn": ?
Hi @Juan Mota Sanchez, thanks for trying this out! Our documentation has a reference page listing all settings in the official extensions. refreshClassesOnSync won't appear there though because KC's change hasn't been released yet. You can also see al settings in the VS Code Settings UI.
https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO_settings
Thanks!
Interesting change. I wondering what was the catalyst for this change? Is the intention to move away from the Server's formatting to allow more flexibility on the VsCode side? If so do you know of VsCode extensions you would recommend to handle ObjectScript formatting (i know of a few but don't know if they support COS).
Also i'm a but on the fence with regard to a new version of the extension introducing a "breaking behavior change". I get that "no formatting" is the way of the future but can't help feeling uneasy about the need to scramble to update our settings whenever VsCode automatically updates the extension. Not a biggie, just... unconfortable.
Hi @Joel Payeur, we made this change to open the door for more comprehensive formatting of files without the server "getting in the way". Such a formatter does not exist yet, but this was a necessary change to make development of one in the future worthwhile. An example of how this might be implemented is a Prettier plugin for ObjectScript.
As for breaking changes, we have made some in the past and will continue to do so if we feel that they lead to a better experience. We understand that adapting to changes takes effort from our users. We will do our best to notify the community ahead of time and refrain from making breaking changes unnecessarily.