Skip to content

Commit 28f3723

Browse files
committed
refactor(python): remove unnecessary logic in nvim-dap-python implementation
1 parent 4a9f340 commit 28f3723

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

lua/astrocommunity/pack/python/init.lua

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,8 @@ return {
101101
dependencies = "mfussenegger/nvim-dap",
102102
ft = "python", -- NOTE: ft: lazy-load on filetype
103103
config = function(_, opts)
104-
local path
105-
106-
local mason_registry_avail, mason_registry = pcall(require, "mason-registry")
107-
if mason_registry_avail and mason_registry.is_installed "debugpy" then
108-
local debugpy_path = vim.fn.expand "$MASON/packages/debugpy"
109-
if vim.fn.has "win32" == 1 then
110-
path = debugpy_path .. "/venv/Scripts/python"
111-
else
112-
path = debugpy_path .. "/venv/bin/python"
113-
end
114-
else
115-
path = vim.fn.exepath "debugpy-adapter"
116-
if path == "" then path = vim.fn.exepath "python" end
117-
end
104+
local path = vim.fn.exepath "debugpy-adapter"
105+
if path == "" then path = vim.fn.exepath "python" end
118106
require("dap-python").setup(path, opts)
119107
end,
120108
},

0 commit comments

Comments
 (0)