`rm(list = ls())` on top of files correlates with objects being automatically deleted
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?
I moved it to VScode-R, languageserver only performs static analysis, and it doesn't alter your R runtime.