diff --git a/lua/iron/fts/python.lua b/lua/iron/fts/python.lua index 35a403a7..90e1c4a6 100644 --- a/lua/iron/fts/python.lua +++ b/lua/iron/fts/python.lua @@ -18,14 +18,7 @@ local windows_linefeed = function(lines) end local is_windows = has('win32') and true or false - -local pyversion -if os.getenv('VIRTUAL_ENV') ~= nil then - pyversion = 'python' -else - pyversion = executable('python3') and 'python3' or 'python' -end - +local pyversion = executable('python3') and 'python3' or 'python' local def = function(cmd) return { @@ -34,9 +27,9 @@ local def = function(cmd) } end -python.ptipython = def({pyversion, "-m", "ptpython.entry_points.run_ptipython"}) -python.ipython = def({pyversion, "-m", "IPython", "--no-autoindent"}) -python.ptpython = def({pyversion, "-m", "ptpython"}) +python.ptipython = def({"ptipython"}) +python.ipython = def({"ipython", "--no-autoindent"}) +python.ptpython = def({"ptpython"}) python.python = { command = {pyversion}, close = {""}