From 0613f29757b688b55b74027063d35dcebc23b10a Mon Sep 17 00:00:00 2001 From: Sam Nystrom Date: Mon, 10 Jul 2023 14:05:55 -0400 Subject: nvim: stuff --- .config/nvim/lua/plugins/neotest.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to '.config/nvim/lua/plugins/neotest.lua') 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 = { { "tt", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run buffer" }, @@ -23,9 +25,20 @@ return { { "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, -- cgit v1.2.3