vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

`rm(list = ls())` on top of files correlates with objects being automatically deleted

Open courtiol opened this issue 1 year ago • 1 comments

While working with VScode, I noticed that when working with specific files I keep loosing the objects in my global environment. The patterns seems that those files start with a remove call (rm(list = ls())), that is before I create my objects. I do not run source() or anything of the kind, so I am wondering what may actually run this line in the background. I suspect, but have no proof, nor reprex, that languageserver may be the culprit but I failed to find anything on the topic. Of course, that could also come from various other VScode extensions and I did not experiment to dissect the issue.

Has anyone else ever encountered this issue?

courtiol avatar Sep 03 '24 14:09 courtiol

I moved it to VScode-R, languageserver only performs static analysis, and it doesn't alter your R runtime.

randy3k avatar Sep 06 '24 00:09 randy3k