Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Indentation is replaced with tabs from spaces on save regardless of editor settings when this extension is enabled. #1930

Closed
steviesama opened this issue Sep 16, 2018 · 2 comments

Comments

@steviesama
Copy link

steviesama commented Sep 16, 2018

Steps to Reproduce:

  1. Enable this extension.
  2. Open a Go source code file with space indentation or convert to such indentation.
  3. Save file and the space indentation will be replaced with tabs on save regardless of editor settings to the contrary.
@steviesama
Copy link
Author

The format tool effects this. The only solution so far has be to pick a format tool that won't install so I guess the step is effectively skipped and when I manually format it to spaces and have the user settings setup properly it's fine. I was using goreturns...I think gofmt did it too...replacing spaces with tabs. Is there any way to change this? Though I'd prefer have an official option to skip the format tool step.

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Sep 18, 2018

Unfortunately, as you realized, its the formatting tool that is doing this and I am not aware of any workarounds at the moment.

If you want to skip the formatting tool being run on save altogether you can do so by setting go.formatOnSave to false in your settings.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants