Skip to content

Commit

Permalink
fix(python): incorrect path for windows debugpy (#862)
Browse files Browse the repository at this point in the history
fix(debugpy): incorrect path for windows debugpy
  • Loading branch information
vkerl authored Apr 10, 2024
1 parent 53b9ed7 commit 1d41ad0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/astrocommunity/pack/python/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ return {
dependencies = "mfussenegger/nvim-dap",
ft = "python", -- NOTE: ft: lazy-load on filetype
config = function(_, opts)
local path = require("mason-registry").get_package("debugpy"):get_install_path() .. "/venv/bin/python"
local path = require("mason-registry").get_package("debugpy"):get_install_path()
if vim.fn.has "win32" == 1 then
path = path .. "/venv/Scripts/python"
else
path = path .. "/venv/bin/python"
end
require("dap-python").setup(path, opts)
end,
},
Expand Down

0 comments on commit 1d41ad0

Please sign in to comment.