sync issue with nested objects, specifically terminal plus
description
During the translation to .json on a backup and back to .cson on a restore some of properties do not get applied, specifically I have seen this with the terminal-plus package and settings that are deeply nested
snippet from backup settings.json
"terminal-plus": {
"ansiColors": {
"normal": {
"blue": {
"red": 120,
"green": 170,
"blue": 214,
"alpha": 1
},
"cyan": {
"red": 118,
"green": 212,
"blue": 214,
"alpha": 1
},
"green": {
"red": 168,
"green": 212,
"blue": 169,
"alpha": 1
},
"magenta": {
"red": 215,
"green": 172,
"blue": 214,
"alpha": 1
},
"red": {
"red": 249,
"green": 140,
"blue": 138,
"alpha": 1
},
"white": {
"red": 214,
"green": 214,
"blue": 214,
"alpha": 1
},
"yellow": {
"red": 255,
"green": 212,
"blue": 121,
"alpha": 1
}
}
},
"core": {},
"style": {
"animationSpeed": 0,
"fontSize": "11",
"theme": "ocean"
},
"toggles": {
"cursorBlink": false
}
}
config.cson after restore
"terminal-plus":
style:
animationSpeed: 0
fontSize: "11"
theme: "ocean"
toggles:
cursorBlink: false
I think the problem is not related to the nesting level but to the setting type. All missing settings are of type color. The Atom settings treat color values differently and don't allow them to be set component by component. Instead they needs to be set as a single object with alpha, 'blue,greenandred`.
I have created #192 which treat objects with color values differently. For me that made it work for the use case you described. It would be great if you could try the changes from the referenced branch and confirm that it solves the problem for you, too.