marciol

marciol

Livebook inside regular editor

Hey, I was using jupyter notebooks and discovered that I was able to use it inside VS Code, with GitHub Copilot and it was a great experience. Do you know if there is something similar for Livebook or something like that for the future?

Marked As Solved

josevalim

josevalim

Creator of Elixir

Livebooks run inside iframes now, so folks can give it a try again. :slight_smile: but we are a small team and it is still unlikely we can prioritize this, but it is more likely we can provide support for those willing to navigate these waters.

Also Liked

_jonas

_jonas

In case anyone is (still) interested in using LiveBooks embedded inside vscode like that, I’ve just made a new extension based on the now available settings for embedding LiveBooks in an iframe, it’s here:

I mainly wanted it so I could open .livemd files directly from within my project.
It can also automatically attach to a running node based on workspace configuration, so you could set it up to always open notebooks attached to your mix project for you workspace.

_jonas

_jonas

Keep in mind it’s just an iframe embed. A big issue I’m just noticing now is this:

https://github.com/microsoft/vscode/issues/129178

Which is quite annoying. Might have to rethink whether the extension makes sense like this..
May have to play around with forking livebook and modifying it to forward events from the iframe up to the host.

Edit: I’ve solved this by forking livebook with a small addition of some JavaScript to forward events to the iframe host.

Not ideal and there are still some issues when switching focus but it will do for now for my use case at least.

w0rd-driven

w0rd-driven

This exists as GitHub - josecfreittas/vscode-livebook: An extension to add support for `.livemd` files and run a Livebook instance inside your VSCode · GitHub but it was archived. One of the known issues was that Livebook can’t live inside an iframe but I believe Livebook is already using iframes. There may be compatibility issues as iframe within an iframe can be problematic.

I haven’t used that extension very much but it was rather functional when I used it in early 2022. Livebook internals have made some shifts that may make it worth reviving the plugin.

I’d also love more official guidance as I have numerous ideas for embedding but haven’t worked through all the limitations.

Last Post!

_jonas

_jonas

Keep in mind it’s just an iframe embed. A big issue I’m just noticing now is this:

https://github.com/microsoft/vscode/issues/129178

Which is quite annoying. Might have to rethink whether the extension makes sense like this..
May have to play around with forking livebook and modifying it to forward events from the iframe up to the host.

Edit: I’ve solved this by forking livebook with a small addition of some JavaScript to forward events to the iframe host.

Not ideal and there are still some issues when switching focus but it will do for now for my use case at least.

Where Next?

Popular in Questions Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement