iron.nvim icon indicating copy to clipboard operation
iron.nvim copied to clipboard

Using specific version of python

Open yelled1 opened this issue 5 years ago • 1 comments

I am trying to use a specific version of python in /usr/bin/gluepython3 So, I tried: in init.vim

luafile $HOME/.config/nvim/plugins.lua

and have lua file as below.

$ cat plugins.lua
local iron = require('iron')

iron.core.add_repl_definitions {
    python = {
        mycustom = {
            command = {"/usr/bin/gluepython3"}
        }
    }
}

iron.core.set_config {
    preferred = {
        python = "python"
    }
}

I tried various combinations: 1st tried

command = {"/usr/bin/gluepython3"}

realized that only send custom command so:

cat ~/.config/nvim/plugins.lua
local iron = require('iron')

iron.core.set_config {
    preferred = {
        python = "gluepython3"
    }
}

and tried replacing above file with python = "/usr/bin/gluepython3" but both times I get memory errors. multiline w/ "/usr/bin/gluepython3" image multiline w/ "gluepython3" image This seems like simple setting issue. Pls let me know how I can fix. I have been in the docs, but not finding the correct info. BTW: It works if python = "python" Thanks,

yelled1 avatar May 01 '20 21:05 yelled1

In file lua/iron/fts/python.lua. I see:

local pyversion  = executable('python3') and 'python3' or 'python'
...
(snip)
...
python.ptipython = def({"ptipython"})
python.ipython = def({"ipython", "--no-autoindent"})
python.ptpython = def({"ptpython"})
python.python = {
  command = {pyversion},
  close = {""}
}

I attempted to change it to: local pyversion = executable('gluepython3') & local pyversion = executable('/usr/bin/gluepython3') but no avail. I get [Process exited 0]

yelled1 avatar May 01 '20 22:05 yelled1