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

Loss of Characters (eaten) on Save #2980

@ArjunDhar

Description

@ArjunDhar

Hi,
ive had a pretty serious issue with VSCode (details & settings available at the end of this report).
But decided to report it when I realized some other VSCode developers are having the same issue.

Issue
After working a few minutes (random, nothing to do with time) On Save ; characters are removed. Maybe related to Auto format (?!)

Hack fix
Only way to get around is Close Workspace. Even closing the file does not help. So I jsut trust Git and if I notice any changes, copy , reopen the workspace and paste :(

Experience GIF Below
Image
Link @ https://gophers.slack.com/archives/C029RQSEE/p1578979720120100

Settings

  • VSCode 1.41.1 on Windows 10
    Reg. other settings I have tried many settings; so please dont think this issue is only specific to this setting. At the time of writing however my setting is:
{
    "window.zoomLevel": 0,
    "editor.fontSize": 13,
    "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
    "go.formatTool": "gofmt", //"goreturns",
    "go.useLanguageServer": true,
    "go.autocompleteUnimportedPackages": true,
    "go.gocodeAutoBuild": true,

    // Added
    "go.docsTool" :"gogetdoc",
    "go.delveConfig": {
        "dlvLoadConfig": {
            "followPointers": true,
            "maxVariableRecurse": 1,
            "maxStringLen": 64,
            "maxArrayValues": 64,
            "maxStructFields": -1
        },
        "apiVersion": 2,
        "showGlobalVariables": true
    },

    //Added later
    "[go]": {
        "editor.insertSpaces": false,
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": false
        }
    },
    "C_Cpp.updateChannel": "Insiders"
}

Worspace settings:

{
	"folders": [
		{
			"path": "D:\\MyWork\\MyCo\\projects\\xyz\\code\\gitlab\\src"
			// "path": "."
		}
	],
	"settings": {
		"go.autocompleteUnimportedPackages": true,
		"go.formatTool": "gofmt", //"goreturns",
		"go.useLanguageServer": true,
		"go.gocodeAutoBuild": true,
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions