From f723b644865d0e5179f2cbe76ab21e1e15a46591 Mon Sep 17 00:00:00 2001 From: Smaug123 Date: Wed, 3 Apr 2024 21:21:46 +0100 Subject: [PATCH] Add more debugger-related commands in Python --- home-manager/nvim/nvim-dap-python.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/home-manager/nvim/nvim-dap-python.lua b/home-manager/nvim/nvim-dap-python.lua index cd88bac..31945b1 100644 --- a/home-manager/nvim/nvim-dap-python.lua +++ b/home-manager/nvim/nvim-dap-python.lua @@ -1 +1,17 @@ require("dap-python").setup("%PYTHONENV%/bin/python") + +do + local whichkey = require("which-key") + whichkey.register({ + p = { + d = { + "Debugger-related commands", + t = { + "Tests", + f = { require("dap-python").test_class, "Run Python tests in the current file" }, + c = { require("dap-python").test_method, "Run the Python test under the cursor" }, + }, + }, + }, + }, { prefix = vim.api.nvim_get_var("maplocalleader") }) +end