diff options
| author | Your Name <you@example.com> | 2024-07-03 17:03:56 +0100 |
|---|---|---|
| committer | Your Name <you@example.com> | 2024-07-03 17:03:56 +0100 |
| commit | c959b2112fb4c82b5bfd410df21706455225bd40 (patch) | |
| tree | 6774868448d127c2f560827de8e5edbd868a2832 /lua/config/python-which_key.lua | |
Diffstat (limited to 'lua/config/python-which_key.lua')
| -rw-r--r-- | lua/config/python-which_key.lua | 25 |
1 files changed, 25 insertions, 0 deletions
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"] = { "<cmd>lua require('neotest').run.run()<cr>", + "Test Method" } +lvim.builtin.which_key.mappings["dM"] = { "<cmd>lua require('neotest').run.run({strategy = 'dap'})<cr>", + "Test Method DAP" } +lvim.builtin.which_key.mappings["df"] = { + "<cmd>lua require('neotest').run.run({vim.fn.expand('%')})<cr>", "Test Class" } +lvim.builtin.which_key.mappings["dF"] = { + "<cmd>lua require('neotest').run.run({vim.fn.expand('%'), strategy = 'dap'})<cr>", "Test Class DAP" } +lvim.builtin.which_key.mappings["dS"] = { "<cmd>lua require('neotest').summary.toggle()<cr>", "Test Summary" } + +-- binding for switching +lvim.builtin.which_key.mappings["P"] = { + name = "Python", + e = { "<cmd>lua require('swenv.api').pick_venv()<cr>", "Choose Env" }, + dm = { "<cmd>lua require('neotest').run.run()<cr>", + "Test Method" }, + dM = { "<cmd>lua require('neotest').run.run({strategy = 'dap'})<cr>", + "Test Method DAP" }, + df = { + "<cmd>lua require('neotest').run.run({vim.fn.expand('%')})<cr>", "Test Class" }, + dF = { + "<cmd>lua require('neotest').run.run({vim.fn.expand('%'), strategy = 'dap'})<cr>", "Test Class DAP" }, + dS = { "<cmd>lua require('neotest').summary.toggle()<cr>", "Test Summary" } +} + |
