Skip to content

Commit

Permalink
perf(python): make sure mason-nvim-dap doesn't set up python debuggers (
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter authored Jul 5, 2023
1 parent 751b846 commit eff0d7f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lua/astrocommunity/pack/python/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ return {
},
{
"jay-babu/mason-nvim-dap.nvim",
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "python") end,
opts = function(_, opts)
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "python")
if not opts.handlers then opts.handlers = {} end
opts.handlers.python = function() end -- make sure python doesn't get set up by mason-nvim-dap, it's being set up by nvim-dap-python
end,
},
{
"linux-cultist/venv-selector.nvim",
Expand All @@ -29,10 +33,8 @@ return {
},
{
"mfussenegger/nvim-dap-python",
dependencies = { "mfussenegger/nvim-dap" },
-- NOTE: ft: lazy-load on filetype
ft = "python",
event = "User AstroFile",
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"
require("dap-python").setup(path, opts)
Expand Down

0 comments on commit eff0d7f

Please sign in to comment.