summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/neotest.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins/neotest.lua')
-rw-r--r--.config/nvim/lua/plugins/neotest.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/neotest.lua b/.config/nvim/lua/plugins/neotest.lua
index 74817a5..5e22696 100644
--- a/.config/nvim/lua/plugins/neotest.lua
+++ b/.config/nvim/lua/plugins/neotest.lua
@@ -7,6 +7,8 @@ return {
"antoinemadec/FixCursorHold.nvim",
"nvim-neotest/neotest-python",
+ "rouge8/neotest-rust",
+ "nvim-neotest/neotest-go",
},
keys = {
{ "<leader>tt", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run buffer" },
@@ -23,9 +25,20 @@ return {
{ "<leader>tws", function() require("neotest").watch.stop() end, desc = "Stop watching" },
},
config = function()
+ local neotest_ns = vim.api.nvim_create_namespace("neotest")
+ vim.diagnostic.config({
+ virtual_text = {
+ format = function(diagnostic)
+ return diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "")
+ end,
+ },
+ }, neotest_ns)
+
require("neotest").setup({
adapters = {
require("neotest-python"),
+ require("neotest-rust"),
+ require("neotest-go"),
},
})
end,