if vim.g.vscode then return end local nnoremap = require('halfdan.keymap').nnoremap local neotest = require('neotest') local neotest_ns = vim.api.nvim_create_namespace("neotest") vim.diagnostic.config({ virtual_text = { format = function(diagnostic) local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "") return message end, }, }, neotest_ns) nnoremap("nt", function() neotest.run.run() end) nnoremap("nf", function() neotest.run.run(vim.fn.expand("%")) end) nnoremap("nd", function() neotest.run.run({ strategy = "dap" }) end) nnoremap("ns", function() neotest.summary.toggle() end)