Skip to content

Commit

Permalink
feat(nvim): neotest improved diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Apr 24, 2024
1 parent 21ab7fc commit 3969675
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion nvim-fredrik/lua/plugins/neotest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,20 @@ return {
opts.adapters = adapters
end

require("neotest").setup(opts)
-- get neotest namespace (api call creates or returns namespace)
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)

require("neotest").setup(opts)
end,

keys = require("config.keymaps").setup_neotest_keymaps(),
},
}

0 comments on commit 3969675

Please sign in to comment.