vscode-perforce icon indicating copy to clipboard operation
vscode-perforce copied to clipboard

Add compatibility with "editor.formatOnSaveMode": "modifications"

Open ijdoc opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. As I understand it, the "editor.formatOnSaveMode" feature in VSCode must be informed of the current workspace file changes in order to apply formatting rules to those changes only, however, it does not seem that this perforce extension provides the information that the feature requires. Thus, as a result, formatting cannot be applied using this feature

Describe the solution you'd like That the perforce extension provide the source control information VSCode expects to apply source control rules/features. Specifically, the formatOnSaveMode option

ijdoc avatar Jun 18 '21 12:06 ijdoc

Hi - thanks for posting - I wasn't aware of this feature

From what I can tell reading the release notes - this should work already - it looks like it's based off of the same source as the gutter decorations, that you should see on the left of the editor (as shown in this image from the readme example). Are the decorations working for you?

I haven't (yet) tried this myself - do you have a specific example of the formatter you're trying to use and what you expect to happen vs what actually happens?

mjcrouch avatar Jun 18 '21 15:06 mjcrouch