From 2c897705049cb89d6cd28b59be4bd7db872ffe6b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 27 May 2023 09:36:29 +0200 Subject: [PATCH] feat(noetest): open trouble instead of quickfix on errors when available --- lua/lazyvim/plugins/extras/test/core.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/lazyvim/plugins/extras/test/core.lua b/lua/lazyvim/plugins/extras/test/core.lua index ce4a5856..3d2bbe82 100644 --- a/lua/lazyvim/plugins/extras/test/core.lua +++ b/lua/lazyvim/plugins/extras/test/core.lua @@ -21,6 +21,15 @@ return { -- args = { "-tags=integration" }, -- }, -- }, + quickfix = { + open = function() + if require("lazyvim.util").has("trouble.nvim") then + vim.cmd("Trouble quickfix") + else + vim.cmd("copen") + end + end, + }, }, config = function(_, opts) local neotest_ns = vim.api.nvim_create_namespace("neotest")