REditorSupport / REditorSupport/languageserver
languageserver/editor become unresponsive when .Rprofile prints to stdout
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 675
- Forks
- 118
- Avg merge
- 1d 37m
- Merged PRs (30d)
- 11
Description
I recently got a report from the Sublime Text extension LSP-R about a user cannot get the server running.
After some investigation, it is caused by a line in his .Rprofile which writes to stdout. The exact line is not important, a reproducible example could be just
# put in .Rprofile
cat("Welcome to R\n")
If stdio interface is used (which is the case of Vim, Emacs and Sublime Text users), this unexpected line breaks the communication between R and the editor. Vscode users are luckier because socket connection is used in default.
Possible solution: we could add the --vanilla flag in our documentation, but it will break some users if they rely on anything in .Rprofile.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the R language server is launched over stdio when .Rprofile emits output, and review the documentation around --vanilla. Confirm the expected behavior for Vim, Emacs, and Sublime Text clients, then verify that startup output no longer breaks editor communication without assuming users can lose .Rprofile settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100