Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings: a wild comma appears! #47228

Closed
joaomoreno opened this issue Apr 5, 2018 · 5 comments
Closed

Settings: a wild comma appears! #47228

joaomoreno opened this issue Apr 5, 2018 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug settings-editor VS Code settings editor issues

Comments

@joaomoreno
Copy link
Member

joaomoreno commented Apr 5, 2018

Have these settings:

{
    "editor.formatOnSave": true,
    "files.autoSave": "afterDelay",
    "git.autofetch": false
}

Then type this:

{
    "editor.formatOnSave": true,
    "files.autoSave": "afterDelay",
    "":
    "git.autofetch": false
}

Then this happens automatically:

{
    "editor.formatOnSave": true,
    "files.autoSave": "afterDelay",
    "":
    "git.autofetch",: false
}

kapture 2018-04-05 at 10 59 15

@mjbvz mjbvz assigned aeschli and unassigned mjbvz Apr 5, 2018
@aeschli
Copy link
Contributor

aeschli commented Apr 6, 2018

@roblourens That's from the autoFixSettingsJSON save action

@aeschli aeschli assigned roblourens and unassigned aeschli Apr 6, 2018
@roblourens
Copy link
Member

roblourens commented Apr 6, 2018

Solution: disable autosave or don't type that...

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug settings-editor VS Code settings editor issues labels Apr 6, 2018
@joaomoreno
Copy link
Member Author

joaomoreno commented Apr 10, 2018

@roblourens You mean workaround? I was simply typing syntactically correct JSON...

@roblourens
Copy link
Member

Yes, workaround. I think the best fix is to detect this case specifically. I can look for a colon following the "missing comma" parse error. Or assume that it's rare to put a string value on a different line from its key and don't add the comma in that case.

@joaomoreno
Copy link
Member Author

Yeah I think some heuristics like those are the way forward.

@vscodebot vscodebot bot locked and limited conversation to collaborators May 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug settings-editor VS Code settings editor issues
Projects
None yet
Development

No branches or pull requests

4 participants