Open rwijtvliet opened 4 months ago
I had a look at your stackexchange question and looked at jupyter-vim.
If you are still interested in Iron, you can have the very same functionality with iron. Also with this setup you send multiline blocks as single execution.
Copied post from the discussion here https://github.com/Vigemus/iron.nvim/discussions/380#discussion-6821945:
python = {
command = { "jupyter-console", "--ZMQTerminalInteractiveShell.image_handler=None" },
format = require("iron.fts.common").bracketed_paste,
block_deviders = { "# %%", "#%%" },
},
The option , "--ZMQTerminalInteractiveShell.image_handler=None" can be removed to get the jupyter-console default image display.
I had a look today at https://github.com/jupyter-vim/jupyter-vim. They open qtconsole in an extra window and attach it to the jupyter-console kernel. I can do now the same and can see the repl output like images in qtconsole while sending with iron code from my buffer to the python-console in the nvim buffer. This works even, if the iron buffer is hidden.
Just start the repl in iron and then in a different terminal run jupyter qtconsole --existing --ConsoleWidget.include_other_output=True or set this option in the config file, like instructed in jupyter-vim.
Running code in the ipython buffer created with iron, I noticed that images are not being drawn:
Whereas the same code in the terminal proper does draw the images:
From what I gather, there is an issue displaying images in the terminal buffer in vim. Yet, some plugins (e.g. magma) are able to draw images (maybe because they are not inside a terminal buffer?).
Either way, my feature request is to show images in ipython for sixel or kitty-image-protocol enabled terminals. Maybe using https://github.com/3rd/image.nvim ?
(I think it's not relevant, but my
iron
config in the first screenshot is:PS: See this question on stackexchange for an overview of the options that I have tried.