From c959b2112fb4c82b5bfd410df21706455225bd40 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 3 Jul 2024 17:03:56 +0100 Subject: minor additions --- lua/config/python-which_key.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lua/config/python-which_key.lua (limited to 'lua/config/python-which_key.lua') diff --git a/lua/config/python-which_key.lua b/lua/config/python-which_key.lua new file mode 100644 index 0000000..d51240b --- /dev/null +++ b/lua/config/python-which_key.lua @@ -0,0 +1,25 @@ +lvim.builtin.which_key.mappings["dm"] = { "lua require('neotest').run.run()", + "Test Method" } +lvim.builtin.which_key.mappings["dM"] = { "lua require('neotest').run.run({strategy = 'dap'})", + "Test Method DAP" } +lvim.builtin.which_key.mappings["df"] = { + "lua require('neotest').run.run({vim.fn.expand('%')})", "Test Class" } +lvim.builtin.which_key.mappings["dF"] = { + "lua require('neotest').run.run({vim.fn.expand('%'), strategy = 'dap'})", "Test Class DAP" } +lvim.builtin.which_key.mappings["dS"] = { "lua require('neotest').summary.toggle()", "Test Summary" } + +-- binding for switching +lvim.builtin.which_key.mappings["P"] = { + name = "Python", + e = { "lua require('swenv.api').pick_venv()", "Choose Env" }, + dm = { "lua require('neotest').run.run()", + "Test Method" }, + dM = { "lua require('neotest').run.run({strategy = 'dap'})", + "Test Method DAP" }, + df = { + "lua require('neotest').run.run({vim.fn.expand('%')})", "Test Class" }, + dF = { + "lua require('neotest').run.run({vim.fn.expand('%'), strategy = 'dap'})", "Test Class DAP" }, + dS = { "lua require('neotest').summary.toggle()", "Test Summary" } +} + -- cgit v1.2.3