I have Visual Studio Code Insiders
installed. Basically I've installed Go
extension from Microsoft and written simple hello world app. Now I always use spaces to indent my code, but I saw that it changed to tabs of size 4. So I thought: yay, what a nice extension, now I can start to write my code.
Then I remembered, that the default code indent from gofmt
should be 8 as tabs. And I checked. gofmt main.go
indeed outputs my code with tabs of size 8. But vscode keeps doing tabs of size 4. I thought maybe it doesn't even call gofmt
but when I go RPM->Format document with - it actually does. But still, tabs of size 4. What am I doing wrong in this scenario?
"editor.renderWhitespace": "all",
"editor.fontFamily": "Hack",
"editor.fontSize": 12,
"editor.minimap.enabled": false,
"editor.fontLigatures": true,
"workbench.editor.enablePreview": false,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.cursorSmoothCaretAnimation": true,
"editor.detectIndentation": false
Those my only editor settings and I dont have any custom settings regarding Go
extension