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

feature request: support `provideDocumentRangeFormattingEdits` api

Open bytemain opened this issue 5 months ago • 0 comments

Is your feature request related to a problem? Please describe.

setting config in vscode settings.json:

  "editor.formatOnSave": true,
  "editor.formatOnSaveMode": "modifications"

and then edit go file and save, the file will not be formatted,

Describe the solution you'd like

because when setting editor.formatOnSaveMode to modifications, VSCode will execute provideDocumentRangeFormattingEdits instead of provideDocumentFormattingEdits, currently vscode-go extension only implement provideDocumentFormattingEdits

Image

Describe alternatives you've considered

maybe need go fmt to implement the partial format ability, if this is not planned, it is ok to close this issue.

bytemain avatar Jul 16 '25 06:07 bytemain