randy3k / radian

A 21 century R console
MIT License
1.96k stars 73 forks source link

Autocomplete not working in R interactive terminal #471

Open vincent-van-hoef opened 4 months ago

vincent-van-hoef commented 4 months ago

Hello,

First of all thanks for this great tool!

I have installed and set up radian according to the instructions at https://code.visualstudio.com/docs/languages/r. Everything works fine; I can easily send code from the script to the R terminal and for the most part I am very happy with the setup.

Only the autocomplete in the automatically started terminal does not work. Some suggestions for loaded library names do pop pup, but nothing for data frames, data frame column names or lists.... Interestingly, when opening radian from the vscode integrated terminal (by just typing radian), everything works as expected. The problem only seems to be in the terminal that automatically gets started when sending the first line of code from an R script.

Ubuntu 22.04 radian version: 0.6.12 r executable: /usr/local/lib/R/bin/R r version: 4.3.1 python executable: /usr/bin/python3 python version: 3.10.12

Don't know if it is relvant but I changed some vscode settings: "r.plot.useHttpgd": true, "editor.wordWrap": "wordWrapColumn", "r.rterm.linux": "/usr/local/bin/radian", "editor.autoClosingBrackets": "always", "r.bracketedPaste": true, "liveServer.settings.useLocalIp": false, "r.alwaysUseActiveTerminal": true, "remote.localPortHost": "allInterfaces"

Is there anything I could try to remedy this?

vincent-van-hoef commented 4 months ago

Upon further investigation it seems it also works from the automatically started terminal but only for a short while. Autocompletion disappears after for example sending a bunch of library() calls to the terminal (this is usually how I start the R interactive terminal, so I didn't notice before it did work prior to this library calls). Strange!

vincent-van-hoef commented 4 months ago

Sorry for this confusing issue, but I narrowed it down to the loading of a single package: ggstatsplot. Attaching this via library(ggstatsplot) or even calling a function via ggstatsplot::function immediately stop the autocomplete from working. It would be useful to know if more people have the same issue...