fixed missing function getVenvSuffix
This commit is contained in:
parent
66477e10a0
commit
a2f360ddb4
@ -1,5 +1,13 @@
|
||||
dap = require('dap')
|
||||
|
||||
local function getVenvSuffix()
|
||||
if vim.loop.os_uname().sysname == 'Linux' then
|
||||
return 'bin/python'
|
||||
elseif vim.loop.os_uname().sysname == 'Windows_NT' then
|
||||
return 'Scripts/python.exe'
|
||||
end
|
||||
end
|
||||
|
||||
local function getPythonEnv()
|
||||
local venv = os.getenv("VIRTUAL_ENV")
|
||||
if venv ~= nil then
|
||||
@ -46,14 +54,6 @@ local initDir = vim.api.nvim_list_runtime_paths()[1]
|
||||
local masonpath = vim.fn.stdpath('data') .. '/mason'
|
||||
|
||||
-- PYTHON
|
||||
local function getVenvSuffix()
|
||||
if vim.loop.os_uname().sysname == 'Linux' then
|
||||
return 'bin/python'
|
||||
elseif vim.loop.os_uname().sysname == 'Windows_NT' then
|
||||
return 'Scripts/python.exe'
|
||||
end
|
||||
end
|
||||
|
||||
dap.adapters.python = {
|
||||
type = 'executable';
|
||||
command = masonpath .. '/packages/debugpy/venv/' .. getVenvSuffix();
|
||||
|
Loading…
x
Reference in New Issue
Block a user