REditorSupport / REditorSupport/vscode-R

R extension overwrites user settings.json with only R-related settings (single line)

Open
#1,680 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

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:

  1. Have a user settings.json with many settings (e.g. editor, Python, markdown, workbench, Git) in a readable multi-line format.
  2. 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).
  3. 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


// R path for Mac OS X
"r.rterm.mac": "/usr/local/bin/R",

// R command line options (i.e: --vanilla)
    "r.rterm.option": [
      "--no-save",
      "--no-restore",
      "--no-site-file"
    ],

// Use active terminal for all commands, rather than creating a new R terminal
"r.alwaysUseActiveTerminal": false,

// Use bracketed paste mode
"r.bracketedPaste": false,

// Enable R session watcher
"r.sessionWatcher": true,

// Delay in milliseconds before sending each line to rterm (only applies if r.bracketedPaste is false)
"r.rtermSendDelay": 8,

// Other R-related
"r.rterm.option": [],
"r.source.encoding": "UTF-8",
"r.source.focus": "editor",

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.
Image

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the extension's settings synchronization and configuration-writing entry points, focusing on how settings updates are persisted. Reproduce the issue with a multi-line settings.json containing non-R settings and comments. Done means R settings can be updated without removing other settings or collapsing the file's formatting.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.