-
Notifications
You must be signed in to change notification settings - Fork 7
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
how to enable rlang server #11
Comments
You may try putting the path to R in settings. |
Hello. Not sure what the resolution here was (if any). After updating R, I now have trouble with R-IDE/LSP (rlang). I get no specific error, but rlang is only initialized correctly when I launch ST3 from Terminal. |
try turning on the debug settings of LSP and R-IDE to see what error message you get? |
Thanks for the reply - I did and I am not sure if it has done anything. I did catch this output in the console (which does NOT appear on launch from Terminal):
|
It seems to me a locale issue. And the error occurred when running |
You could check the Sublime
in Sublime console. In the other hand, in terminal, just do |
In Terminal
Not sure if this matters. I tried explicitly setting the LANG in the R-IDE settings file, but this did not have any discernible effect. It could very well be a local issue; since I duplicate settings across machines the issue is also duplicated for me elsewhere. Just very strange that it was fine and working well a few days ago and a complete R distribution reinstall nuked the ST3 packages. In any case, I appreciate your time and suggestions. |
The KeyError was expected. How about the following in console
|
The result was
Of course, when launching from the Terminal the process does generate the expected R console messages. Looks like I need to point ST3 at R differently? I thought putting the path to the R binary in the R-IDE settings would suffice; my bash profile does attach the R binary path to $PATH, which is why it works when calling from Terminal, I suppose. |
How about changing |
Yes, that generates the expected R console messages. Edit: Do you think it is possible to apply something like this |
It is the expected result, could you confirm it?
Try opening Sublime via Finder and via Terminal. |
When launched from Terminal
Looks right to me. When launched from Dock/Finder
|
Oh, why you have these things?
If you are putting some code in
Or it will break some scripts that parse the output of R. |
It would appear as though I have been rather foolish - yes, it is an interactive session I have created with my I think this means that I need to reconsider the way I do my package checking. I do this because I regularly use different machines and wanted a way to ensure the same packages are installed locally on each one. Thank you for helping determine the issue. |
A simple trick is just to check |
I have the same problem, except LSP doesn't even manage to run R. This is macOS Catalina, R 4.0.1. Opening my first R file for a session gets me:
R is definitely located at /usr/local/bin. I have tried changing to just "R --quiet...", and also tried pointing it at the actual executable (/Library/Frameworks/R.framework/Resources/bin/R), but no love. Running Sublime Text from terminal vs launching via the dock makes no difference. Also tried launching from the terminal with sudo, also no difference. $LANG is en-US.UTF-8. Any ideas? I can't think of anything else to try... |
Hi @mtalluto In your LSP settings, if your command looks like the following for your rlang client:
Can you break it up into separate strings so it looks like:
Much like you, I had this error and took me a long time to workout the cause!! But the above edit fixed the issue. |
Hello,
I installed R-IDE and LSP on windows, but LSP cannot start rlang (i guess) - where should I put path to R in settings?
Failed to start server
Traceback (most recent call last):
File "./python3.3/subprocess.py", line 1104, in _execute_child
FileNotFoundError: [WinError 2] Systém nemůže nalézt uvedený soubor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\1762\AppData\Local\sublime\Data\Installed Packages\LSP.sublime-package\plugin/core/process.py", line 28, in start_server
startupinfo=si)
File "./python3.3/subprocess.py", line 819, in init
File "./python3.3/subprocess.py", line 1110, in _execute_child
FileNotFoundError: [WinError 2]
The text was updated successfully, but these errors were encountered: