Open serhez opened 3 weeks ago
I think the best way to fix this will be with some type of state check in here https://github.com/benlubas/molten-nvim/blob/47b9a56d4bc0f877ff9469910b9653c46d462db4/rplugin/python3/molten/__init__.py#L579 to see if we're waiting for a kernel to be ready, and if we are, just using that as the kernel. Might need a new variable to track that, not sure
That actually should work right now, we start tracking the kernel immediately after :MoltenInit
is called, and we do check for the kernel in the same way.
But this schedule wrap ruins things...
`:checkhealth molten`
``` molten: require("molten.health").check() molten-nvim ~ - OK NeoVim >=0.9 - OK Python >=3.10 - OK Python module pynvim found - OK Python module jupyter-client found - OK Python module cairosvg found - OK Python module pnglatex found - OK Python module plotly found - OK Python module kaleido found - WARNING Optional python module pyperclip not found - ADVICE: - pip install pyperclip - OK Python module nbformat found - OK Python module pillow found ````:checkhealth provider` (the python parts)
``` provider.python: require("provider.python.health").check() Python 3 provider (optional) ~ - Using: g:python3_host_prog = "~/envs/nvim/bin/python" - Executable: /Users/ser/envs/nvim/bin/python - Python version: 3.10.4 - pynvim version: 0.4.3 - OK Latest pynvim is installed. Python virtualenv ~ - OK no $VIRTUAL_ENV ```Description
When using molten and no kernel has been chosen yet, running the quarto-nvim functions
run_below()
andrun_above()
(and perhapsrun_all()
, as I haven't tested it) prompt the user for the desired kernel on every cell. Instead, running these functions should just prompt the user for choosing a kernel in the first cell being run. I opened an issue in quarto-nvim repo and the maintainers said this looked like a bug with molten.Reproduction Steps
run_below()
orrun_above()
.This does not look like a personal config-related issue, but I could provide my config for both plugins if needed.
Expected Behavior
Kernel selection should only happen once for a quarto (or any notebook type) buffer, whenever the first cell/range is run.