From bc7e492f5855e8713569159504001b84602347b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Mon, 22 Jan 2024 12:39:39 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(nvim):=20move=20n?= =?UTF-8?q?eotest=20keymaps=20to=20respective=20extras?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/plugins/extras/dap/core.lua | 8 ++++++++ .../lua/plugins/extras/lang/web/typescript-extended.lua | 4 ++++ .config/nvim/lua/plugins/extras/test/core.lua | 9 --------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.config/nvim/lua/plugins/extras/dap/core.lua b/.config/nvim/lua/plugins/extras/dap/core.lua index ee9a5b80..2ecf1689 100644 --- a/.config/nvim/lua/plugins/extras/dap/core.lua +++ b/.config/nvim/lua/plugins/extras/dap/core.lua @@ -22,6 +22,14 @@ return { { "", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" }, }, }, + { + "nvim-neotest/neotest", + optional = true, + -- stylua: ignore + keys = { + { "tL", function() require("neotest").run.run_last({ strategy = "dap" }) end, desc = "Debug Last Test" }, + }, + }, { "folke/which-key.nvim", opts = { diff --git a/.config/nvim/lua/plugins/extras/lang/web/typescript-extended.lua b/.config/nvim/lua/plugins/extras/lang/web/typescript-extended.lua index e8bd04f6..ca3a4669 100644 --- a/.config/nvim/lua/plugins/extras/lang/web/typescript-extended.lua +++ b/.config/nvim/lua/plugins/extras/lang/web/typescript-extended.lua @@ -141,6 +141,10 @@ return { ["neotest-vitest"] = {}, }, }, + -- stylua: ignore + keys = { + { "tw", function() require('neotest').run.run({ jestCommand = 'jest --watch ' }) end, desc = "Run Watch" }, + }, }, { "luckasRanarison/nvim-devdocs", diff --git a/.config/nvim/lua/plugins/extras/test/core.lua b/.config/nvim/lua/plugins/extras/test/core.lua index f0def530..6e25a488 100644 --- a/.config/nvim/lua/plugins/extras/test/core.lua +++ b/.config/nvim/lua/plugins/extras/test/core.lua @@ -1,14 +1,5 @@ return { { import = "lazyvim.plugins.extras.test.core" }, - { - "nvim-neotest/neotest", - -- stylua: ignore - keys = { - { "tl", function() require("neotest").run.run_last() end, desc = "Run Last Test" }, - { "tL", function() require("neotest").run.run_last({ strategy = "dap" }) end, desc = "Debug Last Test" }, - { "tw", "lua require('neotest').run.run({ jestCommand = 'jest --watch ' })", desc = "Run Watch" }, - }, - }, { "folke/which-key.nvim", opts = {