Open Karthik-Dulam opened 4 days ago
I'm using iron.nvim as my repl and I have configured it to ignore blank lines, it works if I use iron.nvim's api visual_send but not with the run_cell from NotebookNavigator.nvim's run_cell. Below is the same code run using both apis in the repl.
# %% def foo(): print("Bar") print("Zoinks!") return # %%
In Ipython
In [1]: print ("With Iron.nvim visual send") With Iron.nvim visual send In [2]: def foo(): ...: print("Bar") ...: print("Zoinks!") ...: return ...: In [3]: print ("With NotebookNaviagtor.nvim run_cell") With NotebookNaviagtor.nvim run_cell In [4]: def foo(): ...: print("Bar") ...: In [5]: print("Zoinks!") Zoinks! In [6]: return File "<ipython-input-6-9b32c1431b19>", line 1 return ^ SyntaxError: 'return' outside function
I should also note that I have passed --no-autoindent to ipython in iron.nvim config.
--no-autoindent
I'm using iron.nvim as my repl and I have configured it to ignore blank lines, it works if I use iron.nvim's api visual_send but not with the run_cell from NotebookNavigator.nvim's run_cell. Below is the same code run using both apis in the repl.
In Ipython