mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(python): ensure debugpy installed if using nvim-dap
This commit is contained in:
parent
a72a84972d
commit
d073ece621
1 changed files with 18 additions and 9 deletions
|
|
@ -46,16 +46,25 @@ return {
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
optional = true,
|
optional = true,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"mfussenegger/nvim-dap-python",
|
{
|
||||||
-- stylua: ignore
|
"mason.nvim",
|
||||||
keys = {
|
opts = function(_, opts)
|
||||||
{ "<leader>dPt", function() require('dap-python').test_method() end, desc = "Debug Method" },
|
opts.ensure_installed = opts.ensure_installed or {}
|
||||||
{ "<leader>dPc", function() require('dap-python').test_class() end, desc = "Debug Class" },
|
vim.list_extend(opts.ensure_installed, { "debugpy" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-dap-python",
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
{ "<leader>dPt", function() require('dap-python').test_method() end, desc = "Debug Method" },
|
||||||
|
{ "<leader>dPc", function() require('dap-python').test_class() end, desc = "Debug Class" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local path = require("mason-registry").get_package("debugpy"):get_install_path()
|
||||||
|
require("dap-python").setup(path .. "/venv/bin/python")
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
config = function()
|
|
||||||
local path = require("mason-registry").get_package("debugpy"):get_install_path()
|
|
||||||
require("dap-python").setup(path .. "/venv/bin/python")
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue