vscode-file-nesting-config
vscode-file-nesting-config copied to clipboard
custom rules lost after update config
Describe the bug
I have some custom rules in %AppData%\Code\User\settings.json-explorer.fileNesting.patterns
after update config by this extension, the custom rules are gone.
Reproduction
- add some custom rule in
%AppData%\Code\User\settings.json, underexplorer.fileNesting.patterns - open Command Palette and run command
File Nesting Updater: Update config now - you will see the custom rule gone
System Info
System:
OS: Windows 10 10.0.19045
Used Package Manager
n/a
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guide.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [X] The provided reproduction is a minimal reproducible of the bug.
Contributions
- [ ] I am willing to submit a PR to fix this issue
- [ ] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
Can confirm this happens for me too, annoying when I want to extend it. Maybe a comment can be added to the end for the updater to ignore that line? Better yet it should only replace or update what's in the config as opposed to that whole section.
What can we do with this? Any idea?
I'd have two solutions:
- Have a custom config field that gets added to the main on update, where you place your additions; possibly with a
"_": "Please use file_nesting.custom instead!"(or comment, aldoe idk if extensions can write comments to settings.json - Cache the old maps (if available) in the extension and store previous version somewhere, then only override the ones that match the previous maps