-
Notifications
You must be signed in to change notification settings - Fork 129
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
WIP: R Notebook #394
base: master
Are you sure you want to change the base?
WIP: R Notebook #394
Conversation
Wow, this looks amazing! I tried to run it in Windows but didn't have much luck so I'm posting the details. Version without YAML header Content of R Markdown document:
I run command
Version with YAML header Content of R Markdown document:
When I do
The cell displays the message Hope that helps, and let me know if it's because my setup is wrong or similar. This is very exciting feature, I'm really looking forward to using it! |
The debug output for the version with the YAML header is probably because I was running it in the same session. If I run it in a fresh session, here's the debug console output I get:
|
The demo is probably too early for any meaningful test. Nothing works at the moment. 🤦 |
Ah, okay! Still very exciting 😃 |
Great works! |
julia-vscode/julia-vscode#980 has a good discussion of the API and implementation details we might also benefit from. |
@jrieken, I encounter another problem: When I delete any cell in the notebook, the language server receives a shutdown signal, and the language server is stopped. I'm wondering if it is intended behavior by sending shutdown request to language server on cell delete? Or am I missing something? |
I guess it is caused by https://github.com/REditorSupport/vscode-r-lsp/pull/59/files#diff-45327f86d4438556066de133327f4ca2R215-L183 where I want to stop the langauge server for single file outside workspace. A notebook is a collection of |
Fixed via REditorSupport/vscode-r-lsp@1a159d4. |
Yeah, whenever a cell is removed we emit a |
@jrieken Thanks! |
I re-implement the @jrieken I've got a few questions before I move on.
which looks like the following in web browser I'm wondering if it is already supported in Notebook to show such HTML content properly in cell output? I tried replacing the resource paths to something like |
A note: |
@renkun-ken I'm playing around a bit with your code. For starters I rebased it to master: https://github.com/markbaas/vscode-R/tree/notebook-mark, perhaps you want to merge that part already ;) |
@renkun-ken supports the view now. Did the trick with an iframe. |
Good to see you continue working on the notebook feature! I'll take a look when possible. |
|
About saving output I see we have a few options.
@renkun-ken what approach would be preferred? |
Thanks for the work, @markbaas!
I think this makes good sense and might better fit more scenarios. |
why is the are the
|
@renkun-ken Added support for restoring saved cells... only that it doesn't work. I have no clue what the problem is. Perhaps a bug in the api. |
Looks awesome! Any update on this? |
This is a great initiative. |
This is a very early, proof-of-concept demo of R Notebook using the VSCode Notebook API as suggested by #378.
The following tasks are initial steps to make the R notebook useful enough:
socketConnection
)executeCell
(based oncallr::r_session
)executeAllCells
cancelCellExecution
(based onr_session$interrupt()
)cancelAllCellsExecution
View()
requestIt seems there's ongoing API iteration recently and some adaptation is needed to fix the features already implemented.
Suggestions are welcome!