added backwards compatibility for hilightgroups in old settings files #527
+109
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request improves backward compatibility for highlight group and entry settings by adding support for legacy property names (with typos) when importing old settings files. It also updates JSON serialization for highlight groups to use a more consistent and modern approach. The most important changes are:
Backward compatibility for highlight settings:
HilightGroupListandHilightEntryList) to thePreferencesandHighlightGroupclasses, respectively, to support importing old settings files that used incorrect property names. These properties redirect data to the correct properties and are marked as obsolete for future removal. [1] [2]HilightEntryListandHilightGroupList) to theSettingsclass to support settings files that had these lists at the root level. These properties redirect data to the correct location inPreferencesand are also marked as obsolete.JSON serialization improvements:
SaveHighlightGroupsAsJSONmethod inConfigManager.csto useJsonConvert.SerializeObjectwith indented formatting and UTF-8 encoding for more consistent and readable JSON output.Dependency and import updates:
usingstatements for highlight-related classes inSettings.csto ensure all entities are available for serialization and deserialization.