Compare commits

..

2 Commits

Author SHA1 Message Date
3b83d4d9a2
refactor(nvim): fix annotaton for get_program_path in dap
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 1m5s
2024-07-14 21:58:52 -05:00
e86c88c54e
perf(nvim): improve lazy loading of nvim-dap-python 2024-07-14 21:58:40 -05:00

View File

@ -24,19 +24,21 @@ return {
event = { "BufReadPre", "BufNewFile" },
config = true,
},
{
"mfussenegger/nvim-dap-python",
ft = "python",
dependencies = {
"mfussenegger/nvim-dap",
},
config = function()
local dap_python = require("dap-python")
dap_python.test_runner = "pytest"
dap_python.setup(vim.fn.stdpath("data") .. "/mason/packages/debugpy/venv/bin/python3")
end,
},
{
"mfussenegger/nvim-dap",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
{
"mfussenegger/nvim-dap-python",
config = function()
local dap_python = require("dap-python")
dap_python.test_runner = "pytest"
dap_python.setup(vim.fn.stdpath("data") .. "/mason/packages/debugpy/venv/bin/python3")
end,
},
},
keys = {
{ "<leader>d", desc = "> DAP" },
{
@ -136,7 +138,7 @@ return {
--- Gets a path for a given program in the environment
---@param program string String of a program in the Mason packages
---@return Path Full path to the program if found, or nil if not
---@return string Full path to the program if found, or nil if not
local function get_program_path(program)
local program_path = vim.fn.stdpath("data") .. "/mason/packages/" .. program .. "/" .. program
return program_path