-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no code highlight in terminal #190
Comments
@renkun-ken Thanks! Do this requrie R Session Watcher to be turned on to use? I thought this is a R Session Watcher.. |
R session watcher does not require radian. The first R interactive in your screenshot is probably created by command If you want to change the default terminal, you need to change the To use radian smoothly, you should also turn on If you prefer opening radian manually by typing radian command in the terminal, you could turn on |
I found it and set
and then
It seems like everything is working but as long as I use it |
I could reproduce your error in a Windows 10 virtualbox machine. It is caused by default R term options not supported by radian. Delete all Rterm option items in VSCode settings or append
The same error also occurs under Linux and macOS. Maybe we should document this somewhere. |
Thanks man. It's working now. But it seems like it uses |
From https://github.com/randy3k/radian/blob/master/radian/__init__.py, we could see radian does not support As for how radian finds the R executable, it looks like it is done by https://github.com/randy3k/rchitect/blob/master/rchitect/utils.py#L22. You could set an environment variable |
It looks like you don't enable R session watcher. Did you follow the updated version of |
@renkun-ken I did and it was working before. I think it's maybe due to the change of R.exe. I change it back and now no window show up at all. I will try later. |
It was working before I change it to radian. Now I created Rprofile via After restarting it, I get
Now I set |
The error message comes from the languageserver and suggests that To enable R session watcher, you should set |
Do |
@renkun-ken were you be able to repro the issue? |
I don't have a Windows at hand at the moment. If I understand it correctly, you have your
reload or restart vscode, and execute If you start a same R process manually in vscode terminal, PS: Just saw your comment at randy3k/radian#64 (comment). Maybe more related to radian on Windows. |
@renkun-ken What you said is correct. But since I changed the path to the default R.exe and it works, I think it might not be related to radian. Btw, it seems like |
@renkun-ken It seems like
but if I change it to
|
It doesn't seem to |
If I remove |
@renkun-ken I logged an issue #195 here and I've also uninstalled radian completely, so I believe it an R extension issue. |
I'm a bit confused about the environment you are starting the R process. Would you mind posting your |
@renkun-ken right now. No matter what I use, r$> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.1 tools_3.6.1 jsonlite_1.6 r$> str(options())
List of 67
$ add.smooth : logi TRUE
$ browser :function (url, ...)
..- attr(*, "srcref")= 'srcref' int [1:8] 24 21 24 73 21 73 24 24
.. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x0000017745295480>
$ browserNLdisabled : logi FALSE
$ CBoundsCheck : logi FALSE
$ check.bounds : logi FALSE
$ citation.bibtex.max : int 1
$ continue : chr "+ "
$ contrasts : Named chr [1:2] "contr.treatment" "contr.poly"
..- attr(*, "names")= chr [1:2] "unordered" "ordered"
$ defaultPackages : chr [1:6] "datasets" "utils" "grDevices" "graphics" ...
$ demo.ask : chr "default"
$ deparse.cutoff : int 60
$ device :function (...)
..- attr(*, "srcref")= 'srcref' int [1:8] 20 20 23 11 20 11 20 23
.. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x0000017745295480>
$ device.ask.default : logi FALSE
$ digits : int 7
$ echo : logi TRUE
$ editor : chr "notepad"
$ encoding : chr "native.enc"
$ example.ask : chr "default"
$ expressions : int 5000
$ help.search.types : chr [1:3] "vignette" "demo" "help"
$ help.try.all.packages : logi FALSE
$ help_type : chr "html"
$ HTTPUserAgent : chr "R (3.6.1 x86_64-w64-mingw32 x86_64 mingw32)"
$ install.packages.compile.from.source: chr "interactive"
$ internet.info : int 2
$ keep.parse.data : logi TRUE
$ keep.parse.data.pkgs : logi FALSE
$ keep.source : logi TRUE
$ keep.source.pkgs : logi FALSE
$ locatorBell : logi TRUE
$ mailer : chr "mailto"
$ matprod : chr "default"
$ max.print : int 99999
$ menu.graphics : logi FALSE
$ na.action : chr "na.omit"
$ nwarnings : int 50
$ OutDec : chr "."
$ page_viewer :function (url, ...)
..- attr(*, "srcref")= 'srcref' int [1:8] 26 25 26 78 25 78 26 26
.. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x0000017745295480>
$ pager : chr "internal"
$ papersize : chr "letter"
$ PCRE_limit_recursion : logi NA
$ PCRE_study : int 10
$ PCRE_use_JIT : logi TRUE
$ pdfviewer : chr "C:/Program Files/R/R-3.6.1/bin/x64/open.exe"
$ pkgType : chr "both"
$ prompt : chr "\033[34mr$>\033[0m "
$ rchitect.py_tools :<environment: 0x000001774778dea8>
$ repos : Named chr "@CRAN@"
..- attr(*, "names")= chr "CRAN"
$ scipen : num 0
$ show.coef.Pvalues : logi TRUE
$ show.error.messages : logi TRUE
$ show.signif.stars : logi TRUE
$ str :List of 3
..$ strict.width: chr "no"
..$ digits.d : int 3
..$ vec.len : int 4
$ str.dendrogram.last : chr "`"
$ stringsAsFactors : logi TRUE
$ timeout : num 60
$ ts.eps : num 1e-05
$ ts.S.compat : logi FALSE
$ unzip : chr "internal"
$ useFancyQuotes : logi FALSE
$ verbose : logi FALSE
$ viewer :function (url, ...)
..- attr(*, "srcref")= 'srcref' int [1:8] 25 20 25 73 20 73 25 25
.. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x0000017745295480>
$ vscodeR :<environment: 0x0000017745ce2948>
$ warn : num 0
$ warning.length : int 1000
$ width : int 207
$ windowsTimeouts : int [1:2] 100 500 r$> Sys.getenv()
ALLUSERSPROFILE C:\ProgramData
APPDATA C:\Users\liqia\AppData\Roaming
asl.log Destination=file
COLORTERM truecolor
CommonProgramFiles C:\Program Files\Common Files
CommonProgramFiles(x86) C:\Program Files (x86)\Common Files
CommonProgramW6432 C:\Program Files\Common Files
COMPUTERNAME DESKTOP-2AE5U2K
ComSpec C:\WINDOWS\system32\cmd.exe
DASHLANE_DLL_DIR C:\Users\liqia\AppData\Roaming\Dashlane\6.1907.0.17833\bin\Firefox_Extension\{442718d9-475e-452a-b3e1-fb1ee16b8e9f}\components;C:\Users\liqia\AppData\Roaming\Dashlane\6.1907.0.17833\ucrt;C:\Users\liqia\AppData\Roaming\Dashlane\6.1907.0.17833\bin\Qt;C:\Users\liqia\AppData\Roaming\Dashlane\6.1907.0.17833\bin\Ssl
DriverData C:\Windows\System32\Drivers\DriverData
GEODA_GDAL_DATA C:\Program Files\GeoDa Software\data
GEODA_OGR_DRIVER_PATH C:\Program Files\GeoDa Software
graphviz C:\Users\liqia\Anaconda3\Library\bin\graphviz
HOME C:\Users\liqia\Documents
HOMEDRIVE C:
HOMEPATH \Users\liqia
LANG en_US.UTF-8
LOCALAPPDATA C:\Users\liqia\AppData\Local
LOGONSERVER \\DESKTOP-2AE5U2K
MSYS2_ENV_CONV_EXCL R_ARCH
NUMBER_OF_PROCESSORS 8
OneDrive C:\Users\liqia\OneDrive
OneDriveConsumer C:\Users\liqia\OneDrive
OS Windows_NT
pandoc C:\Users\liqia\AppData\Local\Pandoc\Pandoc
PATH C:\Program
Files\R\R-3.6.1\bin\x64;C:\Perl64\site\bin;C:\Perl64\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program
Files (x86)\Calibre2\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program
Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common
Files\Intel\WirelessCommon\;C:\Program
Files\Git\cmd;C:\Users\liqia\Anaconda3;C:\Users\liqia\Anaconda3\Library\mingw-w64\bin;C:\Users\liqia\Anaconda3\Library\usr\bin;C:\Users\liqia\Anaconda3\Library\bin;C:\Users\liqia\Anaconda3\Scripts;C:\Users\liqia\AppData\Local\Microsoft\WindowsApps;C:\Users\liqia\AppData\Roaming\Dashlane\5.13.0.20992\bin\Firefox_Extension\{442718d9-475e-452a-b3e1-fb1ee16b8e9f}\components;C:\Users\liqia\AppData\Roaming\Dashlane\5.13.0.20992\ucrt;C:\Users\liqia\AppData\Local\atom\bin;C:\Users\liqia\AppData\Local\Programs\MiKTeX
2.9\miktex\bin\x64\;C:\Users\liqia\AppData\Roaming\Dashlane\5.15.0.21720\bin\Firefox_Extension\{442718d9-475e-452a-b3e1-fb1ee16b8e9f}\components;C:\Users\liqia\AppData\Roaming\Dashlane\5.15.0.21720\ucrt;C:\Users\liqia\AppData\Local\GitHubDesktop\bin;C:\Users\liqia\AppData\Local\Programs\Microsoft
VS Code\bin;C:\Program Files
(x86)\Scapple;C:\Users\liqia\AppData\Local\Microsoft\WindowsApps;C:\Users\liqia\AppData\Roaming\Dashlane\6.1907.0.17833\bin\Firefox_Extension\{442718d9-475e-452a-b3e1-fb1ee16b8e9f}\components;C:\Users\liqia\AppData\Roaming\Dashlane\6.1907.0.17833\ucrt;C:\Users\liqia\AppData\Roaming\Dashlane\6.1907.0.17833\bin\Qt;C:\Users\liqia\AppData\Roaming\Dashlane\6.1907.0.17833\bin\Ssl;C:\Users\liqia\AppData\Local\Pandoc\;;c:\users\liqia\anaconda3\lib\site-packages\pywin32_system32
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE AMD64
PROCESSOR_IDENTIFIER Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
PROCESSOR_LEVEL 6
PROCESSOR_REVISION 8e0a
ProgramData C:\ProgramData
ProgramFiles C:\Program Files
ProgramFiles(x86) C:\Program Files (x86)
ProgramW6432 C:\Program Files
PSModulePath C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC C:\Users\Public
R_ARCH /x64
R_COMPILED_BY gcc 4.9.3
R_DOC_DIR C:\Program Files\R\R-3.6.1\doc
R_HOME C:/Program Files/R/R-3.6.1
R_INCLUDE_DIR C:\Program Files\R\R-3.6.1\include
R_LIBS_USER C:\Users\liqia\Documents/R/win-library/3.6
R_SHARE_DIR C:\Program Files\R\R-3.6.1\share
R_USER C:\Users\liqia\Documents
RADIAN_VERSION 0.4.4
SESSIONNAME Console
SystemDrive C:
SystemRoot C:\WINDOWS
TEMP C:\Users\liqia\AppData\Local\Temp
TERM_PROGRAM vscode
TERM_PROGRAM_VERSION 1.41.1
TMP C:\Users\liqia\AppData\Local\Temp
USERDOMAIN DESKTOP-2AE5U2K
USERDOMAIN_ROAMINGPROFILE DESKTOP-2AE5U2K
USERNAME liqia
USERPROFILE C:\Users\liqia
windir C:\WINDOWS
|
Combined with the VSCode settings you post at #195, (I guess all above info and VSCode settings are effective at the same time?), it looks like you sourced vscode-R session watcher script You need to remove the
|
@renkun-ken I don't think I have a |
You may try the following R code: file.edit("~/.Rprofile")
file.edit(".Rprofile") You may start a new R process with |
If you are sure that no You may remove |
Ok, I finally found out that I have a
@renkun-ken Thanks a lot. |
I have
I did something like this to enable Radian because I could, and it seems to work. However, everytime I write a line in Radian, it directly gets delete so I don't even have time to see the result. Any idea why it's doing this? |
@ChristopheRoyer21 Would you like to post the issue to radian and give more details so that @randy3k could take a closer look at it? |
@renkun-ken Well, unfortunately, I cannot anymore since the problem got solved by itself. I have no idea what happens. I'm new to Radian so I probably changed some options without noticing it |
Closing now. If it stops working again, please feel free to reopen. |
Thanks for the extension. The following gif seems really nice but I didn't have code highlight in my terminal. Am I missing something?
R: 3.6.1
OS: Windows 10
VScode: 1.41.1
The text was updated successfully, but these errors were encountered: