iron.nvim
iron.nvim copied to clipboard
preferred binary not working (ipython)
iron.lua:
local iron = require("iron")
iron.core.set_config {
preferred = {
python = "ipython"
},
repl_open_cmd = "topleft vertical split",
}
_G.my_iron_open_fn = function(orientation)
local old_config = iron.config.repl_open_cmd
iron.core.set_config{repl_open_cmd = orientation}
iron.core.repl_for(vim.api.nvim_buf_get_option(0, "ft"))
iron.core.set_config{repl_open_cmd = old_config}
end
in init.vim:
Plug 'Vigemus/iron.nvim', {'do': ':UpdateRemotePlugins'}
...
if filereadable(expand('~/.config/nvim/iron.lua'))
luafile $HOME/.config/nvim/iron.lua
nmap B <Cmd>lua my_iron_open_fn("rightbelow split")
nmap L <Cmd>lua my_iron_open_fn("topleft vertical split")
endif
At first I thought it might be looking for ipython in the system libraries instead of my venv, so I provided the path to the ipython binary for the venv. That didn't work, so I also installed ipython system-wide, and it still didn't open ipython.
That's weird. One thing could be the way that you're starting your nvim process - if it's spawned from the command line or through a gui directly. If the latter, maybe it's not inheriting the $PATH variable.