perf(nvim): improve lazy loading of nvim-dap-python

This commit is contained in:
Price Hiller 2024-07-14 21:58:40 -05:00
parent 5db54742bd
commit e86c88c54e
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -24,19 +24,21 @@ return {
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
config = true, config = true,
}, },
{
"mfussenegger/nvim-dap",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
{ {
"mfussenegger/nvim-dap-python", "mfussenegger/nvim-dap-python",
ft = "python",
dependencies = {
"mfussenegger/nvim-dap",
},
config = function() config = function()
local dap_python = require("dap-python") local dap_python = require("dap-python")
dap_python.test_runner = "pytest" dap_python.test_runner = "pytest"
dap_python.setup(vim.fn.stdpath("data") .. "/mason/packages/debugpy/venv/bin/python3") dap_python.setup(vim.fn.stdpath("data") .. "/mason/packages/debugpy/venv/bin/python3")
end, end,
}, },
}, {
"mfussenegger/nvim-dap",
event = { "BufReadPre", "BufNewFile" },
keys = { keys = {
{ "<leader>d", desc = "> DAP" }, { "<leader>d", desc = "> DAP" },
{ {