From 94b03f2b0ce0902feb603cfdadfa827071a990d4 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Thu, 25 Jan 2024 15:52:56 +0100 Subject: [PATCH] Enable support for unit testing and debugging --- dot_config/nvim/lua/config/keymaps.lua | 7 +++++++ dot_config/nvim/lua/config/lazy.lua | 2 ++ 2 files changed, 9 insertions(+) diff --git a/dot_config/nvim/lua/config/keymaps.lua b/dot_config/nvim/lua/config/keymaps.lua index 54f5a2a..047eb6e 100644 --- a/dot_config/nvim/lua/config/keymaps.lua +++ b/dot_config/nvim/lua/config/keymaps.lua @@ -10,3 +10,10 @@ map("v", "Q", "norm @q") -- Easier in-file navigation with Tab and S-Tab map("n", "", "") map("n", "", "") + +-- Testing +map("n", "tr", "require('neotest').run.run()") +map("n", "td", "require('dap-go').debug_test()") +map("n", "to", "require('neotest').output.open({enter = true})") +map("n", "tS", "require('neotest').run.stop()") +map("n", "ts", "require('neotest').summary.toggle()") diff --git a/dot_config/nvim/lua/config/lazy.lua b/dot_config/nvim/lua/config/lazy.lua index eac5f8b..8bda5d3 100644 --- a/dot_config/nvim/lua/config/lazy.lua +++ b/dot_config/nvim/lua/config/lazy.lua @@ -12,6 +12,8 @@ require("lazy").setup({ { "LazyVim/LazyVim", import = "lazyvim.plugins" }, -- import any extras modules here { import = "lazyvim.plugins.extras.editor.leap" }, + { import = "lazyvim.plugins.extras.test.core" }, + { import = "lazyvim.plugins.extras.dap.core" }, { import = "lazyvim.plugins.extras.lang.go" }, { import = "lazyvim.plugins.extras.lang.json" }, { import = "lazyvim.plugins.extras.lang.clangd" },