dccsillag / magma-nvim

Interact with Jupyter from NeoVim.
GNU General Public License v3.0
977 stars 49 forks source link

[Bug] pnglatex failing despite images turned off; magma-nvim throws error. #98

Open RobinTruax opened 1 year ago

RobinTruax commented 1 year ago

Describe the bug Any block returning a SymPy object throws an error through pnglatex (which it is using to try to generate an image). A possible fix would be to allow the user to disable or replace pnglatex (personally, I'm not interested in the functionality and would rather disable it than deal with it, given that the Python package looks like it's not being maintained).

To Reproduce Start the python3 kernel, and run the following code. from sympy import Matrix Matrix([[1,0],[0,1]])

Expected behavior I expected, since vim.g.magma_image_provider is set to 'none', that pnglatex wouldn't be called, and if it was, it would run successfully since checkhealth is running correctly. This is likely related to the fact that pnglatex is not maintained and has an open issue of pnglatex producing the same error.

Screenshots pnglatex

WhiteBlackGoose commented 1 year ago

Cannot reproduce on my side

By default, I get image

If I init_session and set image_provider to kitty, then I get this tiny ugly matrix image

And I don't get any output if image_provider is set to none

Can you show all your magma settings?

RobinTruax commented 12 months ago

These are my settings. This is quite strange.

vim.g.magma_image_provider = 'none' vim.g.magma_automatically_open_output = nil vim.g.magma_wrap_output = nil vim.g.magma_output_window_borders = nil vim.g.magma_cell_highlight_group = nil vim.g.magma_save_path = nil vim.g.magma_copy_output = nil