The R extension (REditorSupport.r) overwrites the user settings.json file with a single minified line containing only R-related settings. All other user settings (editor, workbench, Python, Git, formatters, etc.) are removed. The file is saved in compact form (no newlines or indentation), making it hard to edit and maintain.
To Reproduce
Steps to reproduce the behavior:
- Have a user
settings.json with many settings (e.g. editor, Python, markdown, workbench, Git) in a readable multi-line format.
- Use the R extension (e.g. open an R file, run R terminal, change an R setting via the Settings UI, or let the extension sync/write its configuration).
- Observe that
settings.json is replaced by a single line containing only R-related keys. Example of the kind of content that remains (legacy-style keys):
Can you fix this issue by yourself? (We appreciate the help)
No
Expected behavior
- The extension should only update R-related settings (e.g. via
workspace.getConfiguration().update() for specific keys), not replace the entire settings.json.
- Existing non-R settings and file formatting (newlines, indentation, comments) should be preserved.
Environment (please complete the following information):
- OS: macOS
- VSCode Version: Cursor (VS Code–based)
- R Version: 4.2.2
- vscode-R version: 2.8.6