From 5a9c788b08ea261151d975abed9e26a5437e1ef0 Mon Sep 17 00:00:00 2001 From: salomaestro Date: Wed, 19 Feb 2025 16:02:42 +0100 Subject: [PATCH] Add vim-test plugin --- lua/options.lua | 10 ++++++++++ lua/plugins/init.lua | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/lua/options.lua b/lua/options.lua index 2190f5f..70db6ff 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -22,3 +22,13 @@ sign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", num sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = ""}) sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = ""}) sign('DapStopped', { text='', texthl='DapStopped', linehl='DapStopped', numhl= 'DapStopped' }) + +vim.api.nvim_create_autocmd("QuickFixCmdPost", { + callback = function() + local qf = vim.fn.getqflist({ size = 0 }) + if qf.size > 0 then + vim.cmd("copen") + end + end, + pattern = "*", +}) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index a21ec9f..71cbe0b 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -15,6 +15,17 @@ return { end, }, + { + "vim-test/vim-test", + lazy = false, + config = function() + vim.g["test#use_quickfix"] = 1 + vim.g["test#strategy"] = "neovim_sticky" + vim.g["test#python#runner"] = "pytest" + vim.g["test#python#pytest#executable"] = "uv run pytest" + end, + }, + { "mfussenegger/nvim-dap", lazy = true,