diff --git a/lua/config/dap.lua b/lua/config/dap.lua index 6cdd226..ffc2fb1 100644 --- a/lua/config/dap.lua +++ b/lua/config/dap.lua @@ -20,8 +20,8 @@ vim.fn.execute("nnoremap :lua require'dap'.continue()") vim.fn.execute("nnoremap :lua require'dap'.step_over()") vim.fn.execute("nnoremap :lua require'dap'.step_into()") vim.fn.execute("nnoremap :lua require'dap'.step_out()") -vim.fn.execute("nnoremap dt :lua require'config.nvim-dap'.pytest({'-k', ''})") -vim.fn.execute("nnoremap dl :lua require'config.nvim-dap'.launch({''})") +vim.fn.execute("nnoremap dt :lua require'config.dap'.pytest({'-k', ''})") +vim.fn.execute("nnoremap dl :lua require'config.dap'.launch({''})") vim.fn.execute("nnoremap db :lua require'dap'.toggle_breakpoint()") -- vim.fn.execute("nnoremap B :lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))") -- vim.fn.execute("nnoremap lp :lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))") @@ -36,8 +36,8 @@ local env_ok = false local dap = nil local function check_env() - utils.assert_available("python3") - utils.assert_python3_module("debugpy") + utils.assert_installed("python3") + utils.assert_python3_module_installed("debugpy") env_ok = true end diff --git a/lua/pytest.lua b/lua/pytest.lua index 035c238..02f4349 100644 --- a/lua/pytest.lua +++ b/lua/pytest.lua @@ -23,8 +23,8 @@ local dap = nil local function check_env() utils.assert_installed("python3") - utils.python3_module_installed("debugpy") - utils.python3_module_installed("pytest") + utils.assert_python3_module_installed("debugpy") + utils.assert_python3_module_installed("pytest") env_ok = true end diff --git a/lua/utils.lua b/lua/utils.lua index 7c97915..df00e82 100644 --- a/lua/utils.lua +++ b/lua/utils.lua @@ -58,7 +58,7 @@ end --- Asserts that a python module is installed ---@param mod string: The python module to check -function M.python3_module_installed(mod) +function M.assert_python3_module_installed(mod) local resp = vim.system({ "python3", "-m", "pip", "show", mod, }):wait() if not resp.code == 0 then error("Python3 module " .. mod .. " not installed:\n" .. resp.stdout .. "\n" .. resp.stderr)